I’ve created a small node.js module to be used not as a web server, but more as an aid for developing frontend applications regardless of the backend technology used.
What the module does is:
- Searches for .less files, parses them, and saves two copies of the file:
css/main.lessWill be transformed into
css/main.css- parsed less to css
css/main.min.css- parsed less to css and minified
- Searches for .js files, minifies them:
js/main.jsWill be minified and saved to
You can choose to search directories recursively, and if you wish to watch the files for changes, triggering a parsing/minification upon each save.
Each change triggers a growl notification, so you’ll be able to catch errors earlier:
Install node.js and npm (see https://github.com/joyent/node/wiki/Installation ) Be sure to have the node library in your path!
Open up your terminal :
If everything works, you should now be able to do :
Support combining files
Add images for Growl notifications (Info / Error) Done!
Add more optimizations (pngcrushing, html minification, sprites etc)
Node modules used:
The source is up at github