lesswatch v0.0.4
LESS folder watcher with optional debug information
A nodejs script that allows you to watch a folder for changes and compile the less css files into another folder, optionally passing original lessc compiler arguments. When the --line-numbers=mediaquery argument is used, this nodejs script will fix the syntax so that webkit understands it too.
I only added those latter modifications. All credits should go to those who did the most work (which is like 99%):
Jonathan Cheung for writing the entire less watcher https://github.com/jonycheung/Dead-Simple-LESS-Watch-Compiler
Mikeal Rogers for writing the original folder watch script https://github.com/mikeal/watch
Usage: node lesswatch.js options Example: node lesswatch.js --line-numbers=mediaquery less css
That will watch ./less folder and compile the less css files into
./css when they are added/changed and add mediaquery-formatted
debug info to the css for debugging with webkit-inspector.###Prerequisites
Install LESS (http://www.lesscss.org/) and make sure the lessc binary is accessible to the script. Installing LESS with the --global flag will make the binary accessible to your system.
npm install less --global###Usage
node lesswatch.js [options] <source-folder> <destination-folder>###Example
node lesswatch.js --line-numbers=mediaquery less cssThat will watch ./less folder and compile the less css files into ./css when they are added/changed and add mediaquery-formatted debug info to the css for debugging with webkit-inspector.
- This script only compiles files with
.lessextension. More file extensions can be added by modifying theallowedExtensionsarray. - Files that start with underscores
_style.cssor period.style.cssare ignored. This behavior can be changed in thefilterFiles()function.