一覧へ戻る
LBrian/postcss-class-rename(新しいタブで開きます)
主要言語: JavaScript
PostCSS plugin simply replaces string without hassle
- star 数
- 8
- watcher 数
- 0
- fork 数
- 3
- issue 数
- 0
- 最終更新
- 2022/01/13
主要言語: JavaScript
PostCSS plugin simply replaces string without hassle
PostCSS plugin to replace class name by giving key-value mapping in options.
npm install postcss-class-rename --save-dev
postcss({
plugins: [
require('autoprefixer'),
require('postcss-class-rename')({
// replace 'button-' in class name to 'btn-'
button-: 'btn-',
// All options are treated as replacement mapping
...
})
]
}),
const rename = require('postcss-class-rename');
module.exports = ({ env }) => {
plugins: [
rename({
// All options are treated as replacement mapping
button-: 'btn-',
...
})
]
}