1.0.0 • Published 2 years ago

postcss-replace-string v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

postcss-replace-string

postcss字符串替换插件

使用postcss 处理css文件时替换AtRule节点params内容,Declaration节点prop,value内容,Comment节点text内容,Rule节点selector内容

安装

npm install --save-dev postcss-replace-string

使用

--postcss.config.js

module.exports = (ctx) => {
    return {
        plugins: {
            "postcss-replace-string": {
                replacePairs: [
                    {
                        source: "color",
                        target: "background-color"
                    }
                ]
            }
        }
    }
}