Change working directory for npm scripts

前端 未结 2 374
迷失自我
迷失自我 2021-02-02 05:14

Q: Is it possible to change the the context in which npm runs scripts?

What I want to is the following:



        
2条回答
  •  借酒劲吻你
    2021-02-02 05:21

    npm allows only to do cd dir && command -args, which will also run on Windows.

    A change to use node's spawn functionality has been made in PR https://github.com/npm/npm/pull/10958, but was rejected, due to the above solution.

提交回复
热议问题