Watch specified directory or file for changes to LESS files, and save the generated CSS where specified
Install from the npm registry
npm i less-watch-compile
node node_modules/less-watch-compile -w <dir> -o <dir> -f <path>
-o, --outputDir Define what directory to output compiled LESS to [REQUIRED]
-w, --watchDir Specify what directory to watch [Defaults to '/']
-f, --file Specify a particular file to watch, rather than watching an entire directory
-s, --safetyOff Add flag to disable checking for underscore ( _ ) preceding filenames [Defaults to false]
Note, if both ---watchDir and --file are used, --watchDir will be ignored
Parent
|----src
|--------main.less
|----public
|--------styles
|------------main.css
In the example directory above, the contents src/ can be compiled to public/styles/ using
node node_modules/less-watch-compile -w src -o public/styles
To only watch for main.less, use
node node_modules/less-watch-compile -f src/main.less -o public/styles
- Set up check to ignore LESS files that are imports of another LESS file
If you find any bugs, please submit an issue. This project is still in a early stage, and any feedback would greatly help! :)
1.1.8
MIT