I'm trying to setup a watchfile in webstorm.
I want to precompile one file into my main templates.js aggregate file.
Is this possible?
If I use /path/to/hello.tpl -f templates.js option it just overwrites all my other templates in the templates.js file.
If I use /path/to/templates > templates.js that means I have to precompile every single template in my filewatcher when I modify just one template.
Edit:
If you pass a directory, and redirect its output to a file, you can get all precompiled templates in one file. handlebars -e tpl ./templates/ > ./js/templates.js
This will precompile all ./templates/*.tpl files and save them to ./js/templates.js which you can then include in your page.
Here's some more info about the technique: http://berzniz.com/post/24743062344/handling-handlebars-js-like-a-pro