{"maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"}],"keywords":["css","postcss","postcss-plugin"],"dist-tags":{"latest":"2.0.2"},"author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"description":"Exclude/warn on duplicated PostCSS plugins.","readme":"# [postcss][postcss]-filter-plugins [![Build Status](https://travis-ci.org/postcss/postcss-filter-plugins.svg?branch=master)][ci]\n\n> Exclude/warn on duplicated PostCSS plugins.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-filter-plugins) do:\n\n```console\n$ npm install postcss-filter-plugins --save\n```\n\n## Example\n\nNote that this plugin does not actually transform your CSS; instead, it ensures\nthat plugins in the PostCSS instance are not duplicated. It is intended to be\nused by plugin packs such as [cssnano] or [cssnext].\n\n```js\nvar counter = postcss.plugin('counter', function () {\n    return function (css) {\n        css.eachDecl('foo', function (decl) {\n            let value = parseInt(decl.value, 10);\n            value += 1;\n            decl.value = String(value);\n        });\n    }\n});\n\nvar css = 'h1 { foo: 1 }';\nvar out = postcss([\n    filter(),\n    counter(),\n    counter()\n]).process(css).css;\n\nconsole.log(out);\n// => h1 { foo: 2 }\n// Note that you will get a PostCSS warning in the message registry\n```\n\n## API\n\n### filterPlugins([options])\n\n#### options\n\n##### direction\n\nType: `string`  \nDefault: `'both'`\n\nPass `'forward'`, `'backward'`, or `'both'` to customise the direction in which the\nplugin will look in the plugins array. See the [tests] for examples on how this\nworks.\n\n```js\npostcss([ filter({\n    direction: 'forward'\n}) ]).process(css).css);\n```\n\n##### exclude\n\nType: `array`  \nDefault: `[] (empty)`\n\nPlugins that should be excluded from the filter. Pass an array of plugin names.\n\n```js\npostcss([ filter({\n    exclude: ['postcss-cssstats']\n}) ]).process(css).css);\n```\n\n##### silent\n\nType: `boolean`  \nDefault: `false`\n\nSet this to true to disable the plugin from emitting any PostCSS warnings.\n\n```js\npostcss([ filter({\n    silent: true\n}) ]).process(css).css);\n```\n\n##### template\n\nType: `function`  \nDefault: `format function`\n\nThis function will be passed each PostCSS plugin object. You are expected to\nreturn a string from each call, which is then used to warn the user about her\nduplicated plugins.\n\n```js\npostcss([ filter({\n    template: function (plugin) {\n        return 'Duplicate plugin found: ' + plugin.postcssPlugin;\n    }\n}) ]).process(css).css);\n```\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n| [<img src=\"https://avatars.githubusercontent.com/u/1282980?v=3\" width=\"100px;\"/><br /><sub>Ben Briggs</sub>](http://beneb.info)<br />[💻](https://github.com/postcss/postcss-filter-plugins/commits?author=ben-eb) [📖](https://github.com/postcss/postcss-filter-plugins/commits?author=ben-eb) 👀 [⚠️](https://github.com/postcss/postcss-filter-plugins/commits?author=ben-eb) | [<img src=\"https://avatars.githubusercontent.com/u/157534?v=3\" width=\"100px;\"/><br /><sub>Maxime Thirouin</sub>](https://moox.io/)<br />[📖](https://github.com/postcss/postcss-filter-plugins/commits?author=MoOx) | [<img src=\"https://avatars.githubusercontent.com/u/373545?v=3\" width=\"100px;\"/><br /><sub>Andreas Lind</sub>](https://github.com/papandreou)<br />[💻](https://github.com/postcss/postcss-filter-plugins/commits?author=papandreou) |\n| :---: | :---: | :---: |\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.\nContributions of any kind welcome!\n\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n[ci]:      https://travis-ci.org/postcss/postcss-filter-plugins\n[cssnano]: http://cssnano.co\n[cssnext]: http://cssnext.io\n[postcss]: https://github.com/postcss/postcss\n[tests]:   src/__tests__\n","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-filter-plugins.git"},"bugs":{"url":"https://github.com/postcss/postcss-filter-plugins/issues"},"license":"MIT","versions":{"1.0.0":{"name":"postcss-filter-plugins","version":"1.0.0","description":"Exclude/warn on duplicated PostCSS plugins.","main":"dist/index.js","scripts":{"prepublish":"babel src --out-dir dist --ignore /__tests__/","test-unformatted":"babel-tape-runner \"src/**/__tests__/*.js\"","test":"npm run test-unformatted | faucet"},"files":["LICENSE-MIT","dist"],"keywords":["css","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"babel":"^5.6.2","babel-tape-runner":"^1.1.0","faucet":"0.0.1","postcss-minify-font-weight":"^1.0.1","tape":"^4.0.0"},"homepage":"https://github.com/postcss/postcss-filter-plugins","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git+https://github.com/postcss/postcss-filter-plugins.git"},"dependencies":{"postcss":"^4.1.11","uniqid":"^1.0.0"},"gitHead":"a34603768aea030c147445490214c2269e50d2a4","bugs":{"url":"https://github.com/postcss/postcss-filter-plugins/issues"},"_id":"postcss-filter-plugins@1.0.0","_shasum":"bfd3aef839435a8b19b1fb3111c159a993be38b4","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"bfd3aef839435a8b19b1fb3111c159a993be38b4","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/postcss-filter-plugins/-/postcss-filter-plugins-1.0.0.tgz"},"maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"}],"directories":{}},"1.0.1":{"name":"postcss-filter-plugins","version":"1.0.1","description":"Exclude/warn on duplicated PostCSS plugins.","main":"dist/index.js","scripts":{"prepublish":"babel src --out-dir dist --ignore /__tests__/","test-unformatted":"babel-tape-runner \"src/**/__tests__/*.js\"","test":"npm run test-unformatted | tap-spec"},"files":["LICENSE-MIT","dist"],"keywords":["css","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"babel":"^5.6.2","babel-tape-runner":"^1.1.0","postcss-minify-font-weight":"^1.0.1","tap-spec":"^4.1.0","tape":"^4.0.0"},"homepage":"https://github.com/postcss/postcss-filter-plugins","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git+https://github.com/postcss/postcss-filter-plugins.git"},"dependencies":{"postcss":"^4.1.11","uniqid":"^1.0.0"},"gitHead":"1d66b8093e19ed181d5484fc2fd9e0f913962e01","bugs":{"url":"https://github.com/postcss/postcss-filter-plugins/issues"},"_id":"postcss-filter-plugins@1.0.1","_shasum":"27f8279d5efab7aa3c17098813986b4b9d1d50e2","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"27f8279d5efab7aa3c17098813986b4b9d1d50e2","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/postcss-filter-plugins/-/postcss-filter-plugins-1.0.1.tgz"},"maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"}],"directories":{}},"2.0.0":{"name":"postcss-filter-plugins","version":"2.0.0","description":"Exclude/warn on duplicated PostCSS plugins.","main":"dist/index.js","scripts":{"prepublish":"babel src --out-dir dist --ignore /__tests__/","test-unformatted":"babel-tape-runner \"src/**/__tests__/*.js\"","test":"npm run test-unformatted | tap-spec"},"files":["LICENSE-MIT","dist"],"keywords":["css","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"babel":"^5.8.23","babel-tape-runner":"^1.2.0","postcss-minify-font-weight":"^1.0.1","tap-spec":"^4.1.0","tape":"^4.2.0"},"homepage":"https://github.com/postcss/postcss-filter-plugins","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git+https://github.com/postcss/postcss-filter-plugins.git"},"dependencies":{"postcss":"^5.0.4","uniqid":"^1.0.0"},"gitHead":"4d3e4460e36a6f655271c95d0140e53d573b8c69","bugs":{"url":"https://github.com/postcss/postcss-filter-plugins/issues"},"_id":"postcss-filter-plugins@2.0.0","_shasum":"acce5d18c40e51be598911b6eca8b54d9e5bdedf","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"acce5d18c40e51be598911b6eca8b54d9e5bdedf","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/postcss-filter-plugins/-/postcss-filter-plugins-2.0.0.tgz"},"maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"}],"directories":{}},"2.0.1":{"name":"postcss-filter-plugins","version":"2.0.1","description":"Exclude/warn on duplicated PostCSS plugins.","main":"dist/index.js","scripts":{"contributorAdd":"all-contributors add","contributorGenerate":"all-contributors generate","pretest":"eslint src","prepublish":"del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/","test":"ava src/__tests__/","test-012":"ava src/__tests__/"},"files":["LICENSE-MIT","dist"],"keywords":["css","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"all-contributors-cli":"^3.0.5","ava":"^0.15.0","babel-cli":"^6.4.5","babel-core":"^6.4.5","babel-plugin-add-module-exports":"^0.2.0","babel-preset-es2015":"^6.3.13","babel-preset-es2015-loose":"^7.0.0","babel-preset-stage-0":"^6.3.13","babel-register":"^6.9.0","del-cli":"^0.2.0","eslint":"^3.0.0","eslint-config-cssnano":"^3.0.0","eslint-plugin-babel":"^3.3.0","eslint-plugin-import":"^1.10.2"},"homepage":"https://github.com/postcss/postcss-filter-plugins","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git+https://github.com/postcss/postcss-filter-plugins.git"},"dependencies":{"postcss":"^5.0.4","uniqid":"^3.0.0"},"ava":{"require":"babel-register"},"eslintConfig":{"extends":"cssnano"},"gitHead":"fa8d3bed72e3a7ac51cd20e0ee9e72fa52d85870","bugs":{"url":"https://github.com/postcss/postcss-filter-plugins/issues"},"_id":"postcss-filter-plugins@2.0.1","_shasum":"7cd4fb8012ec182505896b79f45a1da22ed41924","_from":".","_npmVersion":"3.10.2","_nodeVersion":"5.4.1","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"7cd4fb8012ec182505896b79f45a1da22ed41924","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/postcss-filter-plugins/-/postcss-filter-plugins-2.0.1.tgz"},"maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/postcss-filter-plugins-2.0.1.tgz_1468334209092_0.9331400454975665"},"directories":{}},"2.0.2":{"name":"postcss-filter-plugins","version":"2.0.2","description":"Exclude/warn on duplicated PostCSS plugins.","main":"dist/index.js","scripts":{"contributorAdd":"all-contributors add","contributorGenerate":"all-contributors generate","pretest":"eslint src","prepublish":"del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/","test":"ava src/__tests__/","test-012":"ava src/__tests__/"},"files":["LICENSE-MIT","dist"],"keywords":["css","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"all-contributors-cli":"^3.0.5","ava":"^0.16.0","babel-cli":"^6.4.5","babel-core":"^6.4.5","babel-plugin-add-module-exports":"^0.2.0","babel-preset-es2015":"^6.3.13","babel-preset-es2015-loose":"^7.0.0","babel-preset-stage-0":"^6.3.13","babel-register":"^6.9.0","del-cli":"^0.2.0","eslint":"^3.0.0","eslint-config-cssnano":"^3.0.0","eslint-plugin-babel":"^3.3.0","eslint-plugin-import":"^1.10.2"},"homepage":"https://github.com/postcss/postcss-filter-plugins","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git+https://github.com/postcss/postcss-filter-plugins.git"},"dependencies":{"postcss":"^5.0.4","uniqid":"^4.0.0"},"ava":{"require":"babel-register"},"eslintConfig":{"extends":"cssnano"},"gitHead":"1e5d52336e0e5fbf8b25815eadeeefde80803b2e","bugs":{"url":"https://github.com/postcss/postcss-filter-plugins/issues"},"_id":"postcss-filter-plugins@2.0.2","_shasum":"6d85862534d735ac420e4a85806e1f5d4286d84c","_from":".","_npmVersion":"3.10.2","_nodeVersion":"5.4.1","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"6d85862534d735ac420e4a85806e1f5d4286d84c","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz"},"maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/postcss-filter-plugins-2.0.2.tgz_1475512119439_0.8767011414747685"},"directories":{}}},"name":"postcss-filter-plugins","time":{"modified":"2016-10-03T16:28:41.403Z","created":"2015-07-20T09:37:34.950Z","1.0.0":"2015-07-20T09:37:34.950Z","1.0.1":"2015-09-01T23:19:04.778Z","2.0.0":"2015-09-04T23:04:27.635Z","2.0.1":"2016-07-12T14:36:51.739Z","2.0.2":"2016-10-03T16:28:41.403Z"},"readmeFilename":"README.md","homepage":"https://github.com/postcss/postcss-filter-plugins"}