【问题标题】:How to not show start commands on command line when running npm start?运行 npm start 时如何不在命令行上显示启动命令?
【发布时间】:2017-01-13 21:12:03
【问题描述】:

在我的 node.js 应用程序中,我有一个 package.json 文件,其中包含 script.start 属性的此配置

  "scripts": {
    "start": "echo Starting to compile... && node start.js && echo Complete!"
  },

然后当我输入npm start 时,它会显示在命令行上

> my-framework@0.5.5 start C:\app\tools
> echo Starting to compile... && node start.js && echo Complete!

有什么方法可以隐藏它而不显示在命令行中?

谢谢

【问题讨论】:

    标签: node.js command-line npm package.json


    【解决方案1】:

    不要运行npm start,而是运行npm start -s

    如果不将标志传递给npm start,我认为没有任何方法可以做到这一点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-08
      • 2020-12-18
      • 2021-01-01
      • 1970-01-01
      • 2013-05-25
      相关资源
      最近更新 更多