#977974 node-less: `lessc --clean-css` doesn't minify

#977974#5
Date:
2020-12-23 16:39:44 UTC
From:
To:
Package: node-less
Version: 3.13.0+dfsg-2
Severity: normal

Dear Maintainer,

Running `apt install node-less node-clean-css` in a clean sid chroot I'm
unable to make lessc produce minified output.  I don't know if
`--clean-css` does any “cleaning” or if it's a no-op.

    $ lessc --clean-css /tmp/example.less
    /* from http://lesscss.org/#overview */
    #header {
      width: 10px;
      height: 20px;
    }

    $ lessc /tmp/example.less
    /* from http://lesscss.org/#overview */
    #header {
      width: 10px;
      height: 20px;
    }

It does minify if I pass `--compress`, however that flag is currently
deprecated.

    $ lessc --compress /tmp/example.less
    The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.
    #header{width:10px;height:20px}

The plugin appears to load, but I can't pass any parameters:

    $ lessc --plugin=nonexistent /tmp/example.less
    Unable to load plugin nonexistent please make sure that it is installed under or at the same level as less

    $ lessc --plugin=clean-css /tmp/example.less
    /* from http://lesscss.org/#overview */
    #header {
      width: 10px;
      height: 20px;
    }

    $ lessc --plugin=clean-css="advanced" /tmp/example.less
    undefinedError: Options have been provided but the plugin index.js does not support any options.

Thanks,

#977974#10
Date:
2020-12-24 10:11:47 UTC
From:
To:
Forgot to explain why I expected otherwise.  It boils down to the
deprecation notice one gets when using `--compress`:

I'm able to produce minified output with the deprecated `--compress`,
and also with `--clean-css` when installing less and its clean-css
plugin via npm, but not with the Debian packages.  (Dunno if it's a
node-less or a node-clean-css issue.)