cssnano-preset-advanced
Advanced tools
Comparing version 5.3.3 to 5.3.4
{ | ||
"name": "cssnano-preset-advanced", | ||
"version": "5.3.3", | ||
"version": "5.3.4", | ||
"main": "src/index.js", | ||
@@ -15,3 +15,3 @@ "types": "types/index.d.ts", | ||
"autoprefixer": "^10.3.7", | ||
"cssnano-preset-default": "^5.2.7", | ||
"cssnano-preset-default": "^5.2.8", | ||
"postcss-discard-unused": "^5.1.0", | ||
@@ -40,4 +40,3 @@ "postcss-merge-idents": "^5.1.1", | ||
"postcss": "^8.2.15" | ||
}, | ||
"readme": "# cssnano-preset-advanced\n\n> Advanced optimisations for cssnano; may or may not break your CSS!\n\n## Table of Contents\n\n- [Usage](#usage)\n\n - [Install](#install)\n - [Configuration](#configuration)\n\n- [Plugins](#plugins)\n\n - [autoprefixer (external)](#autoprefixer-external)\n - [css-declaration-sorter (external)](#css-declaration-sorter-external)\n - [cssnano-utils](#cssnano-utils)\n - [postcss-calc (external)](#postcss-calc-external)\n - [postcss-colormin](#postcss-colormin)\n - [postcss-convert-values](#postcss-convert-values)\n - [postcss-discard-comments](#postcss-discard-comments)\n - [postcss-discard-duplicates](#postcss-discard-duplicates)\n - [postcss-discard-empty](#postcss-discard-empty)\n - [postcss-discard-overridden](#postcss-discard-overridden)\n - [postcss-discard-unused](#postcss-discard-unused)\n - [postcss-merge-idents](#postcss-merge-idents)\n - [postcss-merge-longhand](#postcss-merge-longhand)\n - [postcss-merge-rules](#postcss-merge-rules)\n - [postcss-minify-font-values](#postcss-minify-font-values)\n - [postcss-minify-gradients](#postcss-minify-gradients)\n - [postcss-minify-params](#postcss-minify-params)\n - [postcss-minify-selectors](#postcss-minify-selectors)\n - [postcss-normalize-charset](#postcss-normalize-charset)\n - [postcss-normalize-display-values](#postcss-normalize-display-values)\n - [postcss-normalize-positions](#postcss-normalize-positions)\n - [postcss-normalize-repeat-style](#postcss-normalize-repeat-style)\n - [postcss-normalize-string](#postcss-normalize-string)\n - [postcss-normalize-timing-functions](#postcss-normalize-timing-functions)\n - [postcss-normalize-unicode](#postcss-normalize-unicode)\n - [postcss-normalize-url](#postcss-normalize-url)\n - [postcss-normalize-whitespace](#postcss-normalize-whitespace)\n - [postcss-ordered-values](#postcss-ordered-values)\n - [postcss-reduce-idents](#postcss-reduce-idents)\n - [postcss-reduce-initial](#postcss-reduce-initial)\n - [postcss-reduce-transforms](#postcss-reduce-transforms)\n - [postcss-svgo](#postcss-svgo)\n - [postcss-unique-selectors](#postcss-unique-selectors)\n - [postcss-zindex](#postcss-zindex)\n\n- [Contributors](#contributors)\n\n- [License](#license)\n\n## Usage\n\n### Install\n\nWith [npm](https://npmjs.com/package/cssnano-preset-advanced) do:\n\n npm install cssnano-preset-advanced --save-dev\n\nIf you don't have npm then [check out this installation tutorial](https://npmjs.com/package/cssnano-preset-advanced/tutorial).\n\n### Configuration\n\nIf you would like to use the preset in its default configuration, specify a section in your `package.json`:\n\n```diff\n {\n \"name\": \"awesome-application\",\n+ \"cssnano\": {\n+ \"preset\": \"advanced\"\n+ }\n }\n```\n\nBut should you wish to customise this, you can pass an array with the second parameter as the options object to use. For example, to remove all comments:\n\n```diff\n {\n \"name\": \"awesome-application\",\n+ \"cssnano\": {\n+ \"preset\": [\n+ \"advanced\",\n+ {\"discardComments\": {\"removeAll\": true}}\n+ ]\n+ }\n }\n```\n\nDepending on your usage, the JSON configuration might not work for you, such as in cases where you would like to use options with customisable function parameters. For this use case, we recommend a `cssnano.config.js` at the same location as your `package.json`. You can then load a preset and export it with your custom parameters:\n\n```js\nconst advancedPreset = require('cssnano-preset-advanced');\n\nmodule.exports = advancedPreset({\n discardComments: {\n remove: (comment) => comment[0] === '@',\n },\n});\n```\n\nNote that you may wish to publish your own preset to npm for reusability, should it differ a lot from this one. This is highly encouraged!\n\n## Plugins\n\n### [`autoprefixer`](https://github.com/postcss/autoprefixer) (external)\n\n> Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website\n\nThis plugin is loaded with the following configuration:\n\n```js\n{\n add: false;\n}\n```\n\n### [`css-declaration-sorter`](https://github.com/Siilwyn/css-declaration-sorter) (external)\n\n> Sorts CSS declarations fast and automatically in a certain order.\n\nThis plugin is loaded with the following configuration:\n\n```js\n{\n exclude: true;\n}\n```\n\n### [`cssnano-utils`](https://github.com/cssnano/cssnano/tree/master/packages/cssnano-utils)\n\n> Utility methods used by cssnano\n\n### [`postcss-calc`](https://github.com/postcss/postcss-calc) (external)\n\n> PostCSS plugin to reduce calc()\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-colormin`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-colormin)\n\n> Minify colors in your CSS files with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-convert-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-convert-values)\n\n> Convert values with PostCSS (e.g. ms -> s)\n\nThis plugin is loaded with the following configuration:\n\n```js\n{\n length: false;\n}\n```\n\n### [`postcss-discard-comments`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-comments)\n\n> Discard comments in your CSS files with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-discard-duplicates`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-duplicates)\n\n> Discard duplicate rules in your CSS files with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-discard-empty`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-empty)\n\n> Discard empty rules and values with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-discard-overridden`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-overridden)\n\n> PostCSS plugin to discard overridden @keyframes or @counter-style.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-discard-unused`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-discard-unused)\n\n> Discard unused counter styles, keyframes and fonts.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-merge-idents`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-merge-idents)\n\n> Merge keyframe and counter style identifiers.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-merge-longhand`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-merge-longhand)\n\n> Merge longhand properties into shorthand with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-merge-rules`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-merge-rules)\n\n> Merge CSS rules with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-minify-font-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-font-values)\n\n> Minify font declarations with PostCSS\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-minify-gradients`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-gradients)\n\n> Minify gradient parameters with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-minify-params`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-params)\n\n> Minify at-rule params with PostCSS\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-minify-selectors`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-minify-selectors)\n\n> Minify selectors with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-charset`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-charset)\n\n> Add necessary or remove extra charset with PostCSS\n\nThis plugin is loaded with the following configuration:\n\n```js\n{\n add: false;\n}\n```\n\n### [`postcss-normalize-display-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-display-values)\n\n> Normalize multiple value display syntaxes into single values.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-positions`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-positions)\n\n> Normalize keyword values for position into length values.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-repeat-style`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-repeat-style)\n\n> Convert two value syntax for repeat-style into one value.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-string`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-string)\n\n> Normalize wrapping quotes for CSS string literals.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-timing-functions`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-timing-functions)\n\n> Normalize CSS animation/transition timing functions.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-unicode`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-unicode)\n\n> Normalize unicode-range descriptors, and can convert to wildcard ranges.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-url`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-url)\n\n> Normalize URLs with PostCSS\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-normalize-whitespace`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-normalize-whitespace)\n\n> Trim whitespace inside and around CSS rules & declarations.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-ordered-values`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-ordered-values)\n\n> Ensure values are ordered consistently in your CSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-reduce-idents`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-reduce-idents)\n\n> Reduce custom identifiers with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-reduce-initial`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-reduce-initial)\n\n> Reduce initial definitions to the actual initial value, where possible.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-reduce-transforms`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-reduce-transforms)\n\n> Reduce transform functions with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-svgo`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-svgo)\n\n> Optimise inline SVG with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-unique-selectors`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-unique-selectors)\n\n> Ensure CSS selectors are unique.\n\nThis plugin is loaded with its default configuration.\n\n### [`postcss-zindex`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-zindex)\n\n> Reduce z-index values with PostCSS.\n\nThis plugin is loaded with its default configuration.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n" | ||
} | ||
} |
15590