LoginSignup
0
0

More than 5 years have passed since last update.

local gulp 実行

Last updated at Posted at 2017-03-21

目的

  • npm -g install gulp したくない

出来るようになること

  • npm -g install gulp なしで gulp実行

制限

npmのバージョンによりstartによる引数が受け取れない

設定

/package.json
    "//": "You can do run the gulp command by locally version if you do run command just once following.(WIN) 'npm run-script gulpw'"
    "gulp" : "gulp",
    "gulpw" : "doskey gulp=npm run-script gulp -- $*"

上記が、local gulp設定の方法。
最近のWindowsには、doskeyというlinuxでいうaliasがきれるようなのでそれを使った内容となります。
以下のバッチファイルを用意して、実行可能環境を起動できるようにすると少し幸せです
*ただし、この場合は、「gulp TASK名」で起動しないとパラメータエラーとなりますのであしからず

gulpw.bat
 start cmd.exe  /K "doskey gulp=npm run-script gulp -- $*"
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