简体   繁体   English

运行依赖项 package.json 中的脚本

[英]Run script that is in package.json of a dependency

I have this app structure:我有这个应用程序结构:

root
  whatever
  node_modules
    module_A
      package.json 

The package.json of module_A has some scripts. module_A的package.json有一些脚本。 Let's say:比方说:

"scripts": {
  "first_script": whatever
}

How to run first_script from the terminal?如何从终端运行 first_script?

One solution is:一种解决方案是:

npm explore module_A -- npm run first_script

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM