Wondering what’s next for npm?Check out our public roadmap! »

    less-watch-compile

    2.1.0 • Public • Published

    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

    Install

    npm i less-watch-compile

    DownloadsWeekly Downloads

    61

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    6.17 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar