weapp-plugin-replace

0.1.1 • Public • Published

weapp-plugin-replace

替换文件文本

安装

npm i weapp-plugin-replace -D

使用

weapp.config.js

module.exports = {
  plugins: [
    ['weapp-plugin-replace', {
        match: /\.wxss$/,
        config: {
          find: /([0-9])px/,
          replace: (match, count) => {
            return count + 'rpx'
          }
        }
    }]
  ],
};
module.exports = {
  plugins: [
    ['weapp-plugin-replace', {
      config: [{
        find: '1',
        replace: '11'
      },{
        find: '2',
        replace: '22'
      }]]
    }
  ],
};

Package Sidebar

Install

npm i weapp-plugin-replace

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

2.28 kB

Total Files

4

Last publish

Collaborators

  • bzone