Run yarn in a different path

后端 未结 2 2063
灰色年华
灰色年华 2020-12-08 03:31

Is there a way to specify a working directory for yarn? This would be different then the --modules-folder option. Specifically, I\'m trying to run the yarn install command f

相关标签:
2条回答
  • 2020-12-08 04:16

    --cwd is what you want.

    (tested with yarn 1.3.2)

    0 讨论(0)
  • 2020-12-08 04:17

    You can use --cwd like so yarn --cwd <path> <yarn command>.
    The order of arguments is important.

    Example:

    yarn --cwd ~/test_project/ dev
    

    Because the following will not work:

    yarn dev --cwd ~/test_project/
    
    0 讨论(0)
提交回复
热议问题