Registry / devops / less-watch-compiler

less-watch-compiler

JSON →
library1.17.5jsnpmunverified

A CLI tool that watches LESS file changes and automatically compiles them to CSS using the `lessc` compiler. Version 1.17.5 released intermittently; supports Node >=18. Key differentiator: it tracks dependency trees so changes to imported LESS files trigger recompilation of parent files. Filesystem watcher with options for source maps, plugins, and configuration files.

npm install less-watch-compiler
INSTALL
IMPORT
SIG · LESS-WATCH-COMPILE
L
less-watch-compiler
devopsjavascriptv1.17.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI usage
npx less-watch-compiler src dist
Installing globally without lessc
The tool is a CLI, not a library. It requires the `less` package to be installed globally.

Basic usage of less-watch-compiler: global install, watching folders, specifying main file, config file, and run-once.

# Install LESS and less-watch-compiler globally npm install -g less less-watch-compiler # Watch src folder and output to dist less-watch-compiler src dist # With main file (recompile only main.less on any change) less-watch-compiler src dist main.less # Using configuration file less-watch-compiler --config less-watch-compiler.config.json # Run once and exit less-watch-compiler src dist --run-once
less-watch-compiler --version
Debug
Known issues
gotchaRequires global installation of `less` package to provide `lessc` binary.
fix
Run `npm install -g less` before using less-watch-compiler.
affects: all
breakingNode >=18 required as of v1.17.0.
fix
Upgrade Node.js to version 18 or later.
affects: >=1.17.0
deprecatedThe `lessc` binary may be deprecated in future LESS versions. The tool relies on `lessc` and may break if LESS changes its CLI.
fix
Monitor less-watch-compiler updates for compatibility changes.
affects: all
gotchaGlob patterns in source/destination may not work as expected; only directories are watched.
fix
Use directories, not globs, for source and destination parameters.
affects: all
Errors
Common errors & fixes
lessc: command not found
LESS is not installed globally.
fix
Run `npm install -g less` to install the lessc binary.
Upgrade
Version history
1.17.5latest on npm
Audit
Dependencies
lessrequiredThe `lessc` binary must be installed globally to compile LESS files.
Agent activity
2 hits · last 30 days
node
2
Resources
less-watch-compiler — npm install less-watch-compiler · libregistry