Never Patronize Mothers

    postcss-class-rename

    1.0.1 • Public • Published

    postcss-class-rename

    PostCSS plugin to replace class name by giving key-value mapping in options.


    Installation

    npm install postcss-class-rename --save-dev
    

    Usage

    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-',
          ...
        })
      ]
    }
    

    Install

    npm i postcss-class-rename

    DownloadsWeekly Downloads

    246

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • ralphbliu