Local resources and .ExecuteAsTemplate

yes, just forgot to clearly mention the way publishing js done.

recent discussion for images which also applies for your js file. giving some details and pitfalls