【问题标题】:Run script that is in package.json of a dependency运行依赖项的 package.json 中的脚本
【发布时间】:2020-12-23 21:02:15
【问题描述】:

我有这个应用程序结构:

root
  whatever
  node_modules
    module_A
      package.json 

module_A 的 package.json 有一些脚本。比方说:

"scripts": {
  "first_script": whatever
}

如何从终端运行 first_script?

【问题讨论】:

标签: javascript node.js terminal package


【解决方案1】:

一种解决方案是:

npm explore module_A -- npm run first_script

【讨论】:

    猜你喜欢
    • 2015-05-07
    • 2015-05-07
    • 2014-06-02
    • 1970-01-01
    • 2019-09-01
    • 1970-01-01
    • 2013-01-01
    相关资源
    最近更新 更多