postcss-replacer
v0.0.3
Published
PostCSS plugin to replace
Downloads
3
Maintainers
Readme
PostCSS Replace
PostCSS plugin to replace content with mappers
// input content
.foo {
src: url(abc);
src: url(123414)
}
// in your postcss config file, for example .postcssrc.js
module.exports = {
plugins: {
"postcss-replacer": {
mappers: [
{
source: 'abc',
target: 'def'
},
{
source: /\d+/,
target: 'xyz'
}
]
}
}
}
.foo {
src: url(def);
src: url(xyz);
}
Usage
postcss([ require('postcss-replace') ])
See PostCSS docs for examples for your environment.