{
  "name": "clean-css",
  "version": "3.4.6",
  "author": {
    "name": "Jakub Pawlowicz",
    "email": "contact@jakubpawlowicz.com",
    "url": "http://twitter.com/jakubpawlowicz"
  },
  "description": "A well-tested CSS minifier",
  "license": "MIT",
  "keywords": [
    "css",
    "minifier"
  ],
  "homepage": "https://github.com/jakubpawlowicz/clean-css",
  "repository": {
    "type": "git",
    "url": "https://github.com/jakubpawlowicz/clean-css.git"
  },
  "bugs": {
    "url": "https://github.com/jakubpawlowicz/clean-css/issues"
  },
  "bin": {
    "cleancss": "./bin/cleancss"
  },
  "main": "index.js",
  "files": [
    "bin",
    "lib",
    "History.md",
    "index.js",
    "LICENSE"
  ],
  "scripts": {
    "browserify": "browserify --standalone CleanCSS index.js | uglifyjs --compress --mangle -o cleancss-browser.js",
    "bench": "node ./test/bench.js",
    "check": "jshint ./bin/cleancss .",
    "prepublish": "npm run check",
    "test": "vows"
  },
  "dependencies": {
    "commander": "2.8.x",
    "source-map": "0.4.x"
  },
  "devDependencies": {
    "browserify": "11.x",
    "http-proxy": "1.x",
    "jshint": "2.8.x",
    "nock": "2.x",
    "server-destroy": "1.x",
    "uglify-js": "2.4.x",
    "vows": "0.8.x"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "readme": "[![NPM version](https://img.shields.io/npm/v/clean-css.svg?style=flat)](https://www.npmjs.com/package/clean-css)\n[![Linux Build Status](https://img.shields.io/travis/jakubpawlowicz/clean-css/master.svg?style=flat&label=Linux%20build)](https://travis-ci.org/jakubpawlowicz/clean-css)\n[![Windows Build status](https://img.shields.io/appveyor/ci/jakubpawlowicz/clean-css/master.svg?style=flat&label=Windows%20build)](https://ci.appveyor.com/project/jakubpawlowicz/clean-css/branch/master)\n[![Dependency Status](https://img.shields.io/david/jakubpawlowicz/clean-css.svg?style=flat)](https://david-dm.org/jakubpawlowicz/clean-css)\n[![devDependency Status](https://img.shields.io/david/dev/jakubpawlowicz/clean-css.svg?style=flat)](https://david-dm.org/jakubpawlowicz/clean-css#info=devDependencies)\n\n## What is clean-css?\n\nClean-css is a fast and efficient [Node.js](http://nodejs.org/) library for minifying CSS files.\n\nAccording to [tests](http://goalsmashers.github.io/css-minification-benchmark/) it is one of the best available.\n\n\n## Usage\n\n### What are the requirements?\n\n```\nNode.js 0.10+ (tested on CentOS, Ubuntu, OS X 10.6+, and Windows 7+) or io.js 3.0+\n```\n\n### How to install clean-css?\n\n```\nnpm install clean-css\n```\n\n### How to use clean-css CLI?\n\nClean-css accepts the following command line arguments (please make sure\nyou use `<source-file>` as the very last argument to avoid potential issues):\n\n```\ncleancss [options] source-file, [source-file, ...]\n\n-h, --help                     output usage information\n-v, --version                  output the version number\n-b, --keep-line-breaks         Keep line breaks\n-c, --compatibility [ie7|ie8]  Force compatibility mode (see Readme for advanced examples)\n-d, --debug                    Shows debug information (minification time & compression efficiency)\n-o, --output [output-file]     Use [output-file] as output instead of STDOUT\n-r, --root [root-path]         Set a root path to which resolve absolute @import rules\n-s, --skip-import              Disable @import processing\n-t, --timeout [seconds]        Per connection timeout when fetching remote @imports (defaults to 5 seconds)\n--rounding-precision [n]       Rounds to `N` decimal places. Defaults to 2. -1 disables rounding\n--s0                           Remove all special comments, i.e. /*! comment */\n--s1                           Remove all special comments but the first one\n--semantic-merging             Enables unsafe mode by assuming BEM-like semantic stylesheets (warning, this may break your styling!)\n--skip-advanced                Disable advanced optimizations - ruleset reordering & merging\n--skip-aggressive-merging      Disable properties merging based on their order\n--skip-import-from [rules]     Disable @import processing for specified rules\n--skip-media-merging           Disable @media merging\n--skip-rebase                  Disable URLs rebasing\n--skip-restructuring           Disable restructuring optimizations\n--skip-shorthand-compacting    Disable shorthand compacting\n--source-map                   Enables building input's source map\n--source-map-inline-sources    Enables inlining sources inside source maps\n```\n\n#### Examples:\n\nTo minify a **public.css** file into **public-min.css** do:\n\n```\ncleancss -o public-min.css public.css\n```\n\nTo minify the same **public.css** into the standard output skip the `-o` parameter:\n\n```\ncleancss public.css\n```\n\nMore likely you would like to concatenate a couple of files.\nIf you are on a Unix-like system:\n\n```bash\ncat one.css two.css three.css | cleancss -o merged-and-minified.css\n```\n\nOn Windows:\n\n```bat\ntype one.css two.css three.css | cleancss -o merged-and-minified.css\n```\n\nOr even gzip the result at once:\n\n```bash\ncat one.css two.css three.css | cleancss | gzip -9 -c > merged-minified-and-gzipped.css.gz\n```\n\n### How to use clean-css API?\n\n```js\nvar CleanCSS = require('clean-css');\nvar source = 'a{font-weight:bold;}';\nvar minified = new CleanCSS().minify(source).styles;\n```\n\nCleanCSS constructor accepts a hash as a parameter, i.e.,\n`new CleanCSS(options)` with the following options available:\n\n* `advanced` - set to false to disable advanced optimizations - selector & property merging, reduction, etc.\n* `aggressiveMerging` - set to false to disable aggressive merging of properties.\n* `benchmark` - turns on benchmarking mode measuring time spent on cleaning up (run `npm run bench` to see example)\n* `compatibility` - enables compatibility mode, see [below for more examples](#how-to-set-compatibility-mode)\n* `debug` - set to true to get minification statistics under `stats` property (see `test/custom-test.js` for examples)\n* `inliner` - a hash of options for `@import` inliner, see [test/protocol-imports-test.js](https://github.com/jakubpawlowicz/clean-css/blob/master/test/protocol-imports-test.js#L372) for examples, or [this comment](https://github.com/jakubpawlowicz/clean-css/issues/612#issuecomment-119594185) for a proxy use case.\n* `keepBreaks` - whether to keep line breaks (default is false)\n* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one only, `0` for removing all\n* `mediaMerging` - whether to merge `@media` at-rules (default is true)\n* `processImport` - whether to process `@import` rules\n* `processImportFrom` - a list of `@import` rules, can be `['all']` (default), `['local']`, `['remote']`, or a blacklisted path e.g. `['!fonts.googleapis.com']`\n* `rebase` - set to false to skip URL rebasing\n* `relativeTo` - path to **resolve** relative `@import` rules and URLs\n* `restructuring` - set to false to disable restructuring in advanced optimizations\n* `root` - path to **resolve** absolute `@import` rules and **rebase** relative URLs\n* `roundingPrecision` - rounding precision; defaults to `2`; `-1` disables rounding\n* `semanticMerging` - set to true to enable semantic merging mode which assumes BEM-like content (default is false as it's highly likely this will break your stylesheets - **use with caution**!)\n* `shorthandCompacting` - set to false to skip shorthand compacting (default is true unless sourceMap is set when it's false)\n* `sourceMap` - exposes source map under `sourceMap` property, e.g. `new CleanCSS().minify(source).sourceMap` (default is false)\n  If input styles are a product of CSS preprocessor (Less, Sass) an input source map can be passed as a string.\n* `sourceMapInlineSources` - set to true to inline sources inside a source map's `sourcesContent` field (defaults to false)\n  It is also required to process inlined sources from input source maps.\n* `target` - path to a folder or an output file to which **rebase** all URLs\n\nThe output of `minify` method (or the 2nd argument to passed callback) is a hash containing the following fields:\n\n* `styles` - optimized output CSS as a string\n* `sourceMap` - output source map (if requested with `sourceMap` option)\n* `errors` - a list of errors raised\n* `warnings` - a list of warnings raised\n* `stats` - a hash of statistic information (if requested with `debug` option):\n  * `originalSize` - original content size (after import inlining)\n  * `minifiedSize` - optimized content size\n  * `timeSpent` - time spent on optimizations\n  * `efficiency` - a ratio of output size to input size (e.g. 25% if content was reduced from 100 bytes to 75 bytes)\n\n#### How to make sure remote `@import`s are processed correctly?\n\nIn order to inline remote `@import` statements you need to provide a callback to minify method, e.g.:\n\n```js\nvar CleanCSS = require('clean-css');\nvar source = '@import url(http://path/to/remote/styles);';\nnew CleanCSS().minify(source, function (errors, minified) {\n  // minified.styles\n});\n```\n\nThis is due to a fact, that, while local files can be read synchronously, remote resources can only be processed asynchronously.\nIf you don't provide a callback, then remote `@import`s will be left intact.\n\n### How to use clean-css with build tools?\n\n* [Broccoli](https://github.com/broccolijs/broccoli#broccoli): [broccoli-clean-css](https://github.com/shinnn/broccoli-clean-css)\n* [Brunch](http://brunch.io/): [clean-css-brunch](https://github.com/brunch/clean-css-brunch)\n* [Grunt](http://gruntjs.com): [grunt-contrib-cssmin](https://github.com/gruntjs/grunt-contrib-cssmin)\n* [Gulp](http://gulpjs.com/): [gulp-minify-css](https://github.com/jonathanepollack/gulp-minify-css)\n* [Gulp](http://gulpjs.com/): [using vinyl-map as a wrapper - courtesy of @sogko](https://github.com/jakubpawlowicz/clean-css/issues/342)\n* [component-builder2](https://github.com/component/builder2.js): [builder-clean-css](https://github.com/poying/builder-clean-css)\n* [Metalsmith](http://metalsmith.io): [metalsmith-clean-css](https://github.com/aymericbeaumet/metalsmith-clean-css)\n* [Lasso](https://github.com/lasso-js/lasso): [lasso-clean-css](https://github.com/yomed/lasso-clean-css)\n\n### What are the clean-css' dev commands?\n\nFirst clone the source, then run:\n\n* `npm run bench` for clean-css benchmarks (see [test/bench.js](https://github.com/jakubpawlowicz/clean-css/blob/master/test/bench.js) for details)\n* `npm run browserify` to create the browser-ready clean-css version\n* `npm run check` to check JS sources with [JSHint](https://github.com/jshint/jshint/)\n* `npm test` for the test suite\n\n## How to contribute to clean-css?\n\nSee [CONTRIBUTING.md](https://github.com/jakubpawlowicz/clean-css/blob/master/CONTRIBUTING.md).\n\n## Tips & Tricks\n\n### How to preserve a comment block?\n\nUse the `/*!` notation instead of the standard one `/*`:\n\n```css\n/*!\n  Important comments included in minified output.\n*/\n```\n\n### How to rebase relative image URLs?\n\nClean-css will handle it automatically for you (since version 1.1) in the following cases:\n\n* When using the CLI:\n  1. Use an output path via `-o`/`--output` to rebase URLs as relative to the output file.\n  2. Use a root path via `-r`/`--root` to rebase URLs as absolute from the given root path.\n  3. If you specify both then `-r`/`--root` takes precendence.\n* When using clean-css as a library:\n  1. Use a combination of `relativeTo` and `target` options for relative rebase (same as 1 in CLI).\n  2. Use a combination of `relativeTo` and `root` options for absolute rebase (same as 2 in CLI).\n  3. `root` takes precendence over `target` as in CLI.\n\n### How to generate source maps?\n\nSource maps are supported since version 3.0.\n\nAdditionally to mapping original CSS files, clean-css also supports input source maps, so minified styles can be mapped into their [Less](http://lesscss.org/) or [Sass](http://sass-lang.com/) sources directly.\n\nSource maps are generated using [source-map](https://github.com/mozilla/source-map/) module from Mozilla.\n\n#### Using CLI\n\nTo generate a source map, use `--source-map` switch, e.g.:\n\n```\ncleancss --source-map --output styles.min.css styles.css\n```\n\nName of the output file is required, so a map file, named by adding `.map` suffix to output file name, can be created (styles.min.css.map in this case).\n\n#### Using API\n\nTo generate a source map, use `sourceMap: true` option, e.g.:\n\n```js\nnew CleanCSS({ sourceMap: true, target: pathToOutputDirectory })\n  .minify(source, function (minified) {\n    // access minified.sourceMap for SourceMapGenerator object\n    // see https://github.com/mozilla/source-map/#sourcemapgenerator for more details\n    // see https://github.com/jakubpawlowicz/clean-css/blob/master/bin/cleancss#L114 on how it's used in clean-css' CLI\n});\n```\n\nUsing API you can also pass an input source map directly:\n\n```js\nnew CleanCSS({ sourceMap: inputSourceMapAsString, target: pathToOutputDirectory })\n  .minify(source, function (minified) {\n    // access minified.sourceMap to access SourceMapGenerator object\n    // see https://github.com/mozilla/source-map/#sourcemapgenerator for more details\n    // see https://github.com/jakubpawlowicz/clean-css/blob/master/bin/cleancss#L114 on how it's used in clean-css' CLI\n});\n```\n\nOr even multiple input source maps at once (available since version 3.1):\n\n```js\nnew CleanCSS({ sourceMap: true, target: pathToOutputDirectory }).minify({\n  'path/to/source/1': {\n    styles: '...styles...',\n    sourceMap: '...source-map...'\n  },\n  'path/to/source/2': {\n    styles: '...styles...',\n    sourceMap: '...source-map...'\n  }\n}, function (minified) {\n  // access minified.sourceMap as above\n});\n```\n\n### How to minify multiple files with API?\n\n#### Passing an array\n\n```js\nnew CleanCSS().minify(['path/to/file/one', 'path/to/file/two']);\n```\n\n#### Passing a hash\n\n```js\nnew CleanCSS().minify({\n  'path/to/file/one': {\n    styles: 'contents of file one'\n  },\n  'path/to/file/two': {\n    styles: 'contents of file two'\n  }\n});\n```\n\n### How to set a compatibility mode?\n\nCompatibility settings are controlled by `--compatibility` switch (CLI) and `compatibility` option (library mode).\n\nIn both modes the following values are allowed:\n\n* `'ie7'` - Internet Explorer 7 compatibility mode\n* `'ie8'` - Internet Explorer 8 compatibility mode\n* `''` or `'*'` (default) - Internet Explorer 9+ compatibility mode\n\nSince clean-css 3 a fine grained control is available over\n[those settings](https://github.com/jakubpawlowicz/clean-css/blob/master/lib/utils/compatibility.js),\nwith the following options available:\n\n* `'[+-]colors.opacity'` - - turn on (+) / off (-) `rgba()` / `hsla()` declarations removal\n* `'[+-]properties.backgroundClipMerging'` - turn on / off background-clip merging into shorthand\n* `'[+-]properties.backgroundOriginMerging'` - turn on / off background-origin merging into shorthand\n* `'[+-]properties.backgroundSizeMerging'` - turn on / off background-size merging into shorthand\n* `'[+-]properties.colors'` - turn on / off any color optimizations\n* `'[+-]properties.ieBangHack'` - turn on / off IE bang hack removal\n* `'[+-]properties.iePrefixHack'` - turn on / off IE prefix hack removal\n* `'[+-]properties.ieSuffixHack'` - turn on / off IE suffix hack removal\n* `'[+-]properties.merging'` - turn on / off property merging based on understandability\n* `'[+-]properties.spaceAfterClosingBrace'` - turn on / off removing space after closing brace - `url() no-repeat` into `url()no-repeat`\n* `'[+-]properties.urlQuotes'` - turn on / off `url()` quoting\n* `'[+-]properties.zeroUnits'` - turn on / off units removal after a `0` value\n* `'[+-]selectors.adjacentSpace'` - turn on / off extra space before `nav` element\n* `'[+-]selectors.ie7Hack'` - turn on / off IE7 selector hack removal (`*+html...`)\n* `'[+-]selectors.special'` - a regular expression with all special, unmergeable selectors (leave it empty unless you know what you are doing)\n* `'[+-]units.ch'` - turn on / off treating `ch` as a proper unit\n* `'[+-]units.in'` - turn on / off treating `in` as a proper unit\n* `'[+-]units.pc'` - turn on / off treating `pc` as a proper unit\n* `'[+-]units.pt'` - turn on / off treating `pt` as a proper unit\n* `'[+-]units.rem'` - turn on / off treating `rem` as a proper unit\n* `'[+-]units.vh'` - turn on / off treating `vh` as a proper unit\n* `'[+-]units.vm'` - turn on / off treating `vm` as a proper unit\n* `'[+-]units.vmax'` - turn on / off treating `vmax` as a proper unit\n* `'[+-]units.vmin'` - turn on / off treating `vmin` as a proper unit\n* `'[+-]units.vm'` - turn on / off treating `vm` as a proper unit\n\nFor example, using `--compatibility 'ie8,+units.rem'` will ensure IE8 compatibility while enabling `rem` units so the following style `margin:0px 0rem` can be shortened to `margin:0`, while in pure IE8 mode it can't be.\n\nTo pass a single off (-) switch in CLI please use the following syntax `--compatibility *,-units.rem`.\n\nIn library mode you can also pass `compatibility` as a hash of options.\n\n### What advanced optimizations are applied?\n\nAll advanced optimizations are dispatched [here](https://github.com/jakubpawlowicz/clean-css/blob/master/lib/selectors/advanced.js#L59), and this is what they do:\n\n* `recursivelyOptimizeBlocks` - does all the following operations on a block (think `@media` or `@keyframe` at-rules);\n* `recursivelyOptimizeProperties` - optimizes properties in rulesets and \"flat at-rules\" (like @font-face) by splitting them into components (e.g. `margin` into `margin-(*)`), optimizing, and rebuilding them back. You may want to use `shorthandCompacting` option to control whether you want to turn multiple (long-hand) properties into a shorthand ones;\n* `removeDuplicates` - gets rid of duplicate rulesets with exactly the same set of properties (think of including the same Sass / Less partial twice for no good reason);\n* `mergeAdjacent` - merges adjacent rulesets with the same selector or rules;\n* `reduceNonAdjacent` - identifies which properties are overridden in same-selector non-adjacent rulesets, and removes them;\n* `mergeNonAdjacentBySelector` - identifies same-selector non-adjacent rulesets which can be moved (!) to be merged, requires all intermediate rulesets to not redefine the moved properties, or if redefined to be either more coarse grained (e.g. `margin` vs `margin-top`) or have the same value;\n* `mergeNonAdjacentByBody` - same as the one above but for same-rules non-adjacent rulesets;\n* `restructure` - tries to reorganize different-selector different-rules rulesets so they take less space, e.g. `.one{padding:0}.two{margin:0}.one{margin-bottom:3px}` into `.two{margin:0}.one{padding:0;margin-bottom:3px}`;\n* `removeDuplicateMediaQueries` - removes duplicated `@media` at-rules;\n* `mergeMediaQueries` - merges non-adjacent `@media` at-rules by same rules as `mergeNonAdjacentBy*` above;\n\n## Acknowledgments (sorted alphabetically)\n\n* Anthony Barre ([@abarre](https://github.com/abarre)) for improvements to\n  `@import` processing, namely introducing the `--skip-import` /\n  `processImport` options.\n* Simon Altschuler ([@altschuler](https://github.com/altschuler)) for fixing\n  `@import` processing inside comments.\n* Isaac ([@facelessuser](https://github.com/facelessuser)) for pointing out\n  a flaw in clean-css' stateless mode.\n* Jan Michael Alonzo ([@jmalonzo](https://github.com/jmalonzo)) for a patch\n  removing node.js' old `sys` package.\n* Luke Page ([@lukeapage](https://github.com/lukeapage)) for suggestions and testing the source maps feature.\n  Plus everyone else involved in [#125](https://github.com/jakubpawlowicz/clean-css/issues/125) for pushing it forward.\n* Timur Kristóf ([@Venemo](https://github.com/Venemo)) for an outstanding\n  contribution of advanced property optimizer for 2.2 release.\n* Vincent Voyer ([@vvo](https://github.com/vvo)) for a patch with better\n  empty element regex and for inspiring us to do many performance improvements\n  in 0.4 release.\n* [@XhmikosR](https://github.com/XhmikosR) for suggesting new features\n  (option to remove special comments and strip out URLs quotation) and\n  pointing out numerous improvements (JSHint, media queries).\n\n## License\n\nClean-css is released under the [MIT License](https://github.com/jakubpawlowicz/clean-css/blob/master/LICENSE).\n",
  "readmeFilename": "README.md",
  "_id": "clean-css@3.4.6",
  "dist": {
    "shasum": "25b9cb31a331b6a3bd52caaf1297a51f5a910ce8"
  },
  "_from": "clean-css@^3.1.9",
  "_resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.6.tgz"
}
