8
3

More than 3 years have passed since last update.

YarnやNPMでscriptsを実行する際に、コマンド名がわからずにpackage.jsonを確認する人へ

Posted at

package.jsonに定義しているstartやtestは覚えていますが、自分で新たに定義したscriptsの名称はしばらく実行していないと忘れてしまいます。

yarn run or npm runと実行するだけでscriptsの一覧が見れます。
yarnに至っては実行後にコマンドの入力を求めてくれます。

# yarnで実行した場合
$ yarn run 
   - build
      react-scripts-ts build
   - eject
      react-scripts-ts eject
   - start
      react-scripts-ts start
question Which command would you like to run?:

yarn runyarn run xxxとして使うコマンドとして覚えていると、気づかない機能でした :sweat:

8
3
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
8
3