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: E.g. css/main.less Will 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: E.g. js/main.js Will be minified and saved to js/main.min.js
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 :
npm install fe-fu
If everything works, you should now be able to do :
fe-fu --jsDir ./js --lessDir ./css
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