You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jan Tojnar
17e76d772c
The PostCSS 7’ `postcss.plugin` method has been deprecated in favour of manually created function returning an object containing various event handling functions like `Once`, `Declaration`, `Rule` and many more. ```patch - module.exports = postcss.plugin('postcss-dark-theme-class', (opts = {}) => { - checkOpts(opts) - return (root, result) => { root.walkAtRules(atrule => { … }) - } - }) ``` ```patch + module.exports = (opts = {}) => { + checkOpts(opts) + return { + postcssPlugin: 'postcss-dark-theme-class', + Once (root, { result }) { root.walkAtRules(atrule => { … }) + } + } + } + module.exports.postcss = true ``` https://evilmartians.com/chronicles/postcss-8-plugin-migration |
3 years ago | |
---|---|---|
.gitignore | 5 years ago | |
README.md | 5 years ago | |
example.js | 3 years ago | |
index.js | 3 years ago | |
package.json | 3 years ago | |
yarn.lock | 3 years ago |
README.md
@validatem/is-postcss-plugin
Documentation for this module has not been written yet. By the time it reaches 1.0.0, it will have full documentation.
In the meantime, check out the example.js
file in the repository for a usage demonstration.