88
99## Install
1010
11- With [ npm] ( https://npmjs.org/package/postcss-filter-plugins ) do:
12-
1311``` console
14- $ npm install postcss-filter-plugins --save
12+ npm install postcss-filter-plugins
1513```
1614
1715## Example
1816
1917Note that this plugin does not actually transform your CSS; instead, it ensures
2018that plugins in the PostCSS instance are not duplicated. It is intended to be
21- used by plugin packs such as [ cssnano] or [ cssnext ] .
19+ used by plugin packs such as [ cssnano] ( http://cssnano.co ) .
2220
2321``` js
24- var counter = postcss .plugin (' counter' , function () {
25- return function (css ) {
26- css .eachDecl (' foo' , function (decl ) {
27- let value = parseInt (decl .value , 10 );
28- value += 1 ;
29- decl .value = String (value);
30- });
31- }
22+ var counter = postcss .plugin (" counter" , function () {
23+ return function (css ) {
24+ css .eachDecl (" foo" , function (decl ) {
25+ let value = parseInt (decl .value , 10 );
26+ value += 1 ;
27+ decl .value = String (value);
28+ });
29+ };
3230});
3331
34- var css = ' h1 { foo: 1 }' ;
35- var out = postcss ([
36- filter (),
37- counter (),
38- counter ()
39- ]).process (css).css ;
32+ var css = " h1 { foo: 1 }" ;
33+ var out = postcss ([filter (), counter (), counter ()]).process (css).css ;
4034
4135console .log (out);
4236// => h1 { foo: 2 }
@@ -55,7 +49,7 @@ Type: `string`
5549Default: ` 'both' `
5650
5751Pass ` 'forward' ` , ` 'backward' ` , or ` 'both' ` to customise the direction in which the
58- plugin will look in the plugins array. See the [ tests] for examples on how this
52+ plugin will look in the plugins array. See the tests for examples on how this
5953works.
6054
6155``` js
@@ -114,24 +108,6 @@ examples for your environment.
114108
115109## Contributors
116110
117- Thanks goes to these wonderful people ([ emoji key] ( https://github.com/kentcdodds/all-contributors#emoji-key ) ):
118-
119- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
120- <!-- prettier-ignore -->
121- | [<img src="https://avatars.githubusercontent.com/u/1282980?v=3" width="100px;"/><br /><sub><b>Ben Briggs</b></sub>](http://beneb.info)<br />[💻](https://github.com/postcss/postcss-filter-plugins/commits?author=ben-eb "Code") [📖](https://github.com/postcss/postcss-filter-plugins/commits?author=ben-eb "Documentation") [👀](#review-ben-eb "Reviewed Pull Requests") [⚠️](https://github.com/postcss/postcss-filter-plugins/commits?author=ben-eb "Tests") | [<img src="https://avatars.githubusercontent.com/u/157534?v=3" width="100px;"/><br /><sub><b>Maxime Thirouin</b></sub>](https://moox.io/)<br />[📖](https://github.com/postcss/postcss-filter-plugins/commits?author=MoOx "Documentation") | [<img src="https://avatars.githubusercontent.com/u/373545?v=3" width="100px;"/><br /><sub><b>Andreas Lind</b></sub>](https://github.com/papandreou)<br />[💻](https://github.com/postcss/postcss-filter-plugins/commits?author=papandreou "Code") | [<img src="https://avatars3.githubusercontent.com/u/17342435?v=4" width="100px;"/><br /><sub><b>Ryan Zimmerman</b></sub>](http://www.ryanzim.com)<br />[💻](https://github.com/postcss/postcss-filter-plugins/commits?author=RyanZim "Code") | [<img src="https://avatars0.githubusercontent.com/u/1133591?v=4" width="100px;"/><br /><sub><b>James Hunt</b></sub>](http://jamescodes.co.uk)<br />[💻](https://github.com/postcss/postcss-filter-plugins/commits?author=JamesCodes "Code") |
122- | :---: | :---: | :---: | :---: | :---: |
123- <!-- ALL-CONTRIBUTORS-LIST:END -->
124-
125- This project follows the [ all-contributors] ( https://github.com/kentcdodds/all-contributors ) specification.
126- Contributions of any kind welcome!
127-
128-
129- ## License
130-
131- MIT © [ Ben Briggs] ( http://beneb.info )
111+ Thanks goes to [ these wonderful people] ( https://github.com/postcss/postcss-filter-plugins/graphs/contributors )
132112
133- [ ci ] : https://travis-ci.org/postcss/postcss-filter-plugins
134- [ cssnano ] : http://cssnano.co
135- [ cssnext ] : http://cssnext.io
136- [ postcss ] : https://github.com/postcss/postcss
137- [ tests ] : src/__tests__
113+ ## [ License] ( ./LICENSE )
0 commit comments