Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including less-watcher2 with all npm packages installed. Try it out:

var lessWatcher2 = require("less-watcher2")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

less-watcher2 v0.2.0

Automatically detecting changes in .less files and recompiling styles


Automatically detecting changes in .less files and recompiling styles.


About less.js dependency

Supported versions are: 1.2.0 and higher (3.7.1 was last tested).



# npm install -g less-watcher2


$ npm install less-watcher2
$ ln -s ./node_modules/.bin/less-watcher


Show usage info

Global install: $ less-watcher --help

Local install: $ ./less-watcher --help

Use config file

Copy examples/less-watcher.config.json to your working directory and modify it.

Compile and exit (without watching)

Global install: $ less-watcher --just-compile

Local install: $ ./less-watcher --just-compile


$ less-watcher
Configurations JSON file path is not set by argument and file by default value ("less-watcher.config.json") is not exists.
Will be used default configs:
    "path": "./styles/",
    "to_compile": [
        "input_less": "main.less",
        "output_css": "compiled_styles.css"
    "compress": true,
    "debug": true,
    "events": [
    "extensions": [
Compiling less "main.less" to css "compiled_styles.css" (counter: 1) [20:13:01]
Started watcher for less files (".less") in directory ".../styles/" [20:13:01]
Compiled less "main.less" to css "compiled_styles.css" (counter: 1) [20:13:02]
Catched! ".../styles/goods.less" [20:13:11]
Compiling less "main.less" to css "compiled_styles.css" (counter: 2) [20:13:11]
Compiled less "main.less" to css "compiled_styles.css" (counter: 2) [20:13:12]


See docs for automatically generated documentation by JSDoc utility.


$ jsdoc bin/* lib/* -p -d docs



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free