-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any thoughts on a command line compiler templates > compiles javascript? #13
Comments
Yeah, the way I got that to work, is to use a pre start script that reads all of the templates and then compiles and writes them to a static .js file. To use from the command line, just use node.js cli. |
I didn't see a compile script is there one already? |
You'll have to write your own. |
Let us know if anyone is interested but we ended up creating a system for using compiled templates in production, but compiling them on demand in dev. |
Doesn't look like there has been any activity on this. I started playing around with dust.js a month ago or so and was using compiled templates both in CouchDB and served up as static javascript. For this I wrote a script to do it, but recently started trying to take my script to the "next level". It's on github, so anyone who may find it useful by all means. I have some plans for it to help me learn a bit more about the node landscape (vows.js specs, publish to npm, real CLI interface, better logging, the usual). |
I did the same thing as @copenhas with a slightly different approach, mine is just a simple utility to (recursively) compile a directory of templates. There's no configuration, and you can include it as a library to wrap your own interface around it (an express middleware has been one suggestion). |
I am looking at using DustJS as at templating library. I would really like to compile templates down to javascript from the command line, and then include them in by static asset build system.
Does anyone have an thoughts on how this could work?
The text was updated successfully, but these errors were encountered: