Package Exports
- postcss-class-rename-8
- postcss-class-rename-8/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-class-rename-8) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
postcss-class-rename
PostCSS plugin to replace class name by giving key-value mapping in options.
Installation
npm install postcss-class-rename --save-devUsage
rollup
postcss({
plugins: [
require('autoprefixer'),
require('postcss-class-rename')({
// replace 'button-' in class name to 'btn-'
button-: 'btn-',
// All options are treated as replacement mapping
...
})
]
}),
postcss.config.js
const rename = require('postcss-class-rename');
module.exports = ({ env }) => {
plugins: [
rename({
// All options are treated as replacement mapping
button-: 'btn-',
...
})
]
}