1.0.1 • Published 4 years ago

@walrus/plugin-replace v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

NPM version

📦 安装

// npm
npm install @walrus/cli @walrus/plugin-replace

// yarn
yarn add --dev @walrus/cli @walrus/plugin-replace

🔨 使用

项目根目录下添加配置文件

// walrus.config.ts

import { Config } from '@walrus/types';

const config: Config = {
  plugins: {
    replace: {
      files: 'example/**/*',
      from: /foo/g,
      to: 'bar'
    }
  }
};

package.json添加如下代码

"scripts": {
  "replace": "walrus replace"
}

执行 yarn replace