@walrus/plugin-replace
v1.0.1
Published
replace files code
Downloads
4
Readme
📦 安装
// 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