diff --git a/README.md b/README.md index 8fe0a52be..d43af4245 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ [Download](https://github.com/google/web-starter-kit/releases/latest) the kit or clone this repository and build on what is included in the `app` directory. +```bash +$ npm install +$ npm start +``` + There are two HTML starting points, from which you can choose: - `index.html` - the default starting point, containing Material Design layout. diff --git a/docs/commands.md b/docs/commands.md index 8e0d93ded..4d8c9082a 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -3,7 +3,7 @@ There are many commands available to help you build and test sites. Here are a f ## Watch For Changes & Automatically Refresh Across Devices ```sh -$ gulp serve +$ npm start ``` This outputs an IP address you can use to locally test and another that can be used on devices @@ -14,7 +14,7 @@ caching, so your site will stop being available when the web server stops runnin ## Build & Optimize ```sh -$ gulp +$ npm run build ``` Build and optimize the current project, ready for deployment. @@ -29,7 +29,7 @@ no network connectivity. ## Serve the Fully Built & Optimized Site ```sh -$ gulp serve:dist +$ npm run serve:dist ``` This outputs an IP address you can use to locally test and another that can be used on devices @@ -55,7 +55,7 @@ Using the `sw-precache`-generated output makes it very difficult to quickly test ## Performance Insights ```sh -$ gulp pagespeed +$ npm run pagespeed ``` Runs the deployed (public) version of your site against the [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) API to help you stay on top of where you can improve. diff --git a/package.json b/package.json index 5670e1edc..1701e4f2b 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,12 @@ }, "private": true, "scripts": { - "test": "gulp && git status | grep 'working directory clean' >/dev/null || (echo 'Please commit all changes generated by building'; exit 1)" + "start": "gulp serve", + "test": "gulp && git status | grep 'working directory clean' >/dev/null || (echo 'Please commit all changes generated by building'; exit 1)", + "build": "gulp", + "lint": "gulp lint", + "serve:dist": "gulp serve:dist", + "pagespeed": "gulp pagespeed" }, "eslintConfig": { "extends": "google"