@walrus/plugin-replace
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    @walrus/plugin-replace

    替换文件内容

    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

    Install

    npm i @walrus/plugin-replace

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4 kB

    Total Files

    4

    Last publish

    Collaborators

    • wangxingkang
    • wangxingkang1314