Necromancers Playing MTG

    less-watcher-compiler

    0.1.0 • Public • Published

    LESS CSS Watcher + Compiler

    less-watcher-compiler-cli

    1. Watch for file changes and compile less to css.
    2. Customizable lessc options: minify, autoprefixer and flexbugs fixes using PostCSS, etc. (see below).
    3. Works when files are added/removed/moved/renamed/edited, and watcher updates efficiently.
    4. Resume watching after compilation errors are fixed, without exiting process.
    5. Configure multiple source files to watch for changes, and corresponding task to execute.
    6. Reload CSS without refreshing app state in browser (LiveReload - better and faster than Hot reloading)
    7. Works with any popular frontend build setup using CRA (Create React App), Next.js, jQuery, etc.

    Installation

    yarn add -D less-watcher-compiler
    

    Options

    Create less-watcher-compiler.config.js (optional) in the root directory with content similar to example config.js.

    All options can be passed as command line (cli) arguments, which will override config file options.

    Usage

    Add this script to package.json:

      ...
      "scripts": {
        "style": "node ./node_modules/less-watcher-compiler --gulpfile ./node_modules/less-watcher-compiler/gulpfile.js --cwd ./"
      ...

    To watch and compile, run:

    yarn style --sourcemap

    To compile only once (useful for production build), run:

    NODE_ENV=production yarn style css

    To watch and compile with Semantic UI theme.config, run:

    yarn style watch symlink

    Install

    npm i less-watcher-compiler

    DownloadsWeekly Downloads

    24

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    510 kB

    Total Files

    7

    Last publish

    Collaborators

    • ecoin