【问题标题】:How do you put grep commands into npm script?你如何将 grep 命令放入 npm 脚本中?
【发布时间】:2021-03-01 00:49:05
【问题描述】:

我希望我的启动脚本也包含一个 grep 命令。特别是,我希望npm start 命令运行npm start |& grep -v error

我的package.jcon

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
},

【问题讨论】:

    标签: grep npm-scripts


    【解决方案1】:

    你可以使用:

    npm-run-script
    

    更多细节:

    https://docs.npmjs.com/cli/v7/commands/npm-run-script

    【讨论】:

      猜你喜欢
      • 2013-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多