Skip to content

Commit 927f907

Browse files
committed
simplify code, remove deps to ease maintenance
1 parent 4fdfe65 commit 927f907

11 files changed

Lines changed: 818 additions & 9713 deletions

File tree

‎.all-contributorsrc‎

Lines changed: 0 additions & 60 deletions
This file was deleted.

‎.editorconfig‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎.node-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

‎CHANGELOG.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# 3.0.1
22

3-
* Remove vulnerable downstream dependency
3+
- Remove vulnerable downstream dependency
44

55
# 3.0.0
66

7-
* Upgraded to PostCSS 6
7+
- Upgraded to PostCSS 6
88

99
# 2.0.3
1010

1111
_This is a backport release of v3.0.1_
1212

13-
* Remove vulnerable downstream dependency
13+
- Remove vulnerable downstream dependency
1414

1515
# 2.0.2
1616

17-
* Bumped uniqid to `4.0.0`.
17+
- Bumped uniqid to `4.0.0`.
1818

1919
# 2.0.1
2020

21-
* Bumped uniqid to `3.0.0` (thanks to @papandreou).
21+
- Bumped uniqid to `3.0.0` (thanks to @papandreou).
2222

2323
# 2.0.0
2424

25-
* Upgraded to PostCSS 5.
25+
- Upgraded to PostCSS 5.
2626

2727
# 1.0.1
2828

29-
* Fixes an integration issue with cssnano & cssnext, caused by processors that
29+
- Fixes an integration issue with cssnano & cssnext, caused by processors that
3030
do not expose a `postcssPlugin` property.
3131

3232
# 1.0.0
3333

34-
* Initial release.
34+
- Initial release.
File renamed without changes.

‎README.md‎

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,29 @@
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

1917
Note that this plugin does not actually transform your CSS; instead, it ensures
2018
that 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

4135
console.log(out);
4236
// => h1 { foo: 2 }
@@ -55,7 +49,7 @@ Type: `string`
5549
Default: `'both'`
5650

5751
Pass `'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
5953
works.
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

Comments
 (0)