Added a CLI that can compile .dust to .js as well as watch files and/or directories for changes and recompile#44
Added a CLI that can compile .dust to .js as well as watch files and/or directories for changes and recompile#44dinedal wants to merge 2 commits into
Conversation
…le from the command line. Code adapted from: https://raw.github.com/jashkenas/coffee-script/master/lib/coffee-script/command.js
|
Should just use https://github.com/cowboy/grunt |
|
i forked/updated the very old connect-compiler with dust support. the original source is all wrong: it stats files and looks at touched times, when really we need to use any of the dozens of various node-watch*'s to proactively update as opposed to continually re-checking. but it's good enough for development (oh no! 6ms instead of 1ms!) and if you're not compiling static assets in prod well so help you. |
|
I just created a pull request to the linkedin fork of dustjs for my command-line compiler script. I modeled it after |
Code adapted from: https://raw.github.com/jashkenas/coffee-script/master/lib/coffee-script/command.js
I understand this introduces a dependency of optimist. If this is a problem I'm happy to remove it, but optimist is pretty light weight, and reinventing the argument parsing wheel is kinda boring.
More then willing to clean up this code and am open for comments, just let me know and I'll make the changes.
Dust really could use the feature of it's own CLI to encourage adoption.