This repository has been archived by the owner. It is now read-only.
DEPRECATED, see | A CLI for modular minifier cssnano.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
fixtures Handle any errors from PostCSS. Closes cssnano/cssnano#273. Sep 22, 2016
.gitignore Initial commit. Sep 6, 2015
LICENSE-MIT Initial commit. Sep 6, 2015
usage.txt Add `--safe` option to the documentation. (fixes #2) Jan 27, 2016

cssnano-cli Build Status NPM version Dependency Status

A CLI for modular minifier cssnano.


With npm do:

npm install cssnano-cli --global

You can also install cssnano-cli as a development dependency of your project, and get the command by this snippet in your .bashrc:

export PATH=$PATH:./node_modules/.bin


$ cssnano --help

Usage: cssnano [input] [output] {OPTIONS}


    --sourcemap,  -s    Generate a sourcemap within the minified output.

    --no-[featureName]  Disable any individual processor module by its name.
                        [featureName] can be any one of these:

                        autoprefixer        filterOptimiser     normalizeUrl
                        calc                filterPlugins       orderedValues
                        colormin            functionOptimiser   reduceIdents
                        convertValues       mergeIdents         singleCharset
                        core                mergeLonghand       styleCache
                        discardComments     mergeRules          svgo
                        discardDuplicates   minifyFontValues    uniqueSelectors
                        discardEmpty        minifyParams        zindex
                        discardUnused       minifySelectors

    --safe              Disable advanced optimisations that are not always safe.
                        Currently, this disables custom identifier reduction,
                        z-index rebasing, unused at-rule removal & conversion
                        between absolute length values.

    --version,    -v    Outputs the version number.

    --help,       -h    Outputs this help screen.

You can also use stdin & stdout redirections:

cssnano < main.css > main.min.css


Pull requests are welcome. If you add functionality, then please add unit tests to cover it.


MIT © Ben Briggs