npm script command to run a script command from another package.json

后端 未结 3 1061
情书的邮戳
情书的邮戳 2021-02-02 07:20

I have two separate projects that use npm - so I have both :
some_base_folder/projectA/package.json and some_base_folder/projectB/package.json

3条回答
  •  孤城傲影
    2021-02-02 08:05

    I ended up using:

    "scripts": {
       "job": "cd ./sub && \"$npm_execpath\" run subjob",
       ...
    }
    

    because this also works with yarn.

提交回复
热议问题