Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
/ less-watch-compile Public archive

auto compile LESS files in a specified directory or file

License

Notifications You must be signed in to change notification settings

pawlh/less-watch-compile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

less-watch-compile

Watch specified directory or file for changes to LESS files, and save the generated CSS where specified

Installation

Install from npm

npm i less-watch-compile

Usage

node node_modules/less-watch-compile -w <dir> -o <dir> -f <path> -m

--watch-directory, -w Directory to watch. Defaults to current directory if none is specified [string] [default: "./"]
--output-directory, -o Directory to output compiled LESS to [string] [required]
--file, -f Single file to watch [string]
--sourcemap, -m Enable generating of sourcemap [boolean]

Note, if both ---watch-directory and --file are used, --watch-directory will be ignored

Example Usage

Parent
|----src
|--------main.less
|----public
|--------styles
|------------main.css
|------------main.css.map
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

To include a sourcemap with main.css, use

node node_modules/less-watch-compile -f src/main.less -o public/styles -m

Todos

  • Reduce delay in changes detection

Bugs

If you find any bugs, please submit an issue. This project is still in a early stage, and any feedback would greatly help! :)

Version

2.1.0

License

MIT

About

auto compile LESS files in a specified directory or file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published