google / web-starter-kit

Web Starter Kit - a workflow for multi-device websites
http://developers.google.com/web/starter-kit
Apache License 2.0
18.42k stars 3.01k forks source link

Add npm scripts for start, build, lint, etc. - fixes #903 #933

Open jgautsch opened 7 years ago

jgautsch commented 7 years ago

Fixes #903

I ran into this issue- where $ gulp serve or even $ gulp -v would fail. The root cause seemed to be that the gulp executable in my path was not the same version as the one in node_modules/.bin/gulp.

npm scripts have the convenient feature of looking in node_modules/.bin for executables, so using npm scripts to run gulp tasks obviates the need to have the correct gulp version globally installed.

With this change, starting is as simple as:

$ npm install
$ npm start

or with yarn:

$ yarn
$ yarn start

This is convenient, conventional, and similar to how other projects like create-react-app.

googlebot commented 7 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


jgautsch commented 7 years ago

I signed it!

googlebot commented 7 years ago

CLAs look good, thanks!