added templating for js files (build directives)