LoginSignup
0
0

More than 3 years have passed since last update.

プロジェクトのルートから別ディレクトリのnpm scriptをyarnで動かしたいとき〜(npm --prefix的なやつ)

Posted at

わざわざcdするの、めんどくせ

例えばこんなディレクトリだと、appまで降りるのだりいから、makefileとか置いちゃう

app
- package.json
- yarn.lock
makefile

makefileにこうやって書いとこう
プロジェクトのディレクトリ入ったら、速攻でコマンド打って、さっさと開発環境立ち上げてぇし

dev:
    yarn --cwd ./app dev

make devで/appのpackage.jsonのscript実行できるよ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0