https://github.com/btd/postcss-plugin-composition
PostCSS plugin which holds other PostCSS plugins
https://github.com/btd/postcss-plugin-composition
Last synced: 8 months ago
JSON representation
PostCSS plugin which holds other PostCSS plugins
- Host: GitHub
- URL: https://github.com/btd/postcss-plugin-composition
- Owner: btd
- License: mit
- Created: 2016-10-19T12:17:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-19T12:20:39.000Z (over 9 years ago)
- Last Synced: 2025-02-12T07:13:29.072Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS Plugin Composition [![Build Status][ci-img]][ci]
[PostCSS] plugin which holds other PostCSS plugins.
[PostCSS]: https://github.com/postcss/postcss
## Usage
```js
const composition = require('postcss-plugin-composition');
postcss([
composition([
require('postcss-simple-vars')
require('postcss-modules')
]),
require('postcss-autoreset')
])
```
This module has very specific use-case. If you apply all plugins as is with `postcss-modules`.
You will see at the end your css repeated, because `postcss-modules` executes all modules
for you.
That is why need to create composition of plugins that should be applied to each file.
And to the end add plugins which whill be applied to result.