Using gulp without global gulp //edit: and without linking to the bin js file

前端 未结 6 1133
野趣味
野趣味 2021-02-12 18:16

I have a gulpfile.js that runs through perfectly when typing gulp into the commandline.

All the gulp bash command really does is calling the sp

6条回答
  •  情深已故
    2021-02-12 18:44

    In your package.json add the following:

    "scripts": {
      "gulp": "node ./node_modules/gulp/bin/gulp.js " 
    }
    

    and run from command line by typing npm run gulp.

    This removes the dependency on having gulp globally installed

提交回复
热议问题