You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. Your browser will automatically be opened and directed to the browser-sync proxy address
17
-
5. To prepare assets for production, run the `gulp prod` task (Note: the production task does not fire up the express server, and won't provide you with browser-sync's live reloading. Simply use `gulp dev` during development. More information below)
17
+
5. To prepare assets for production, run the `npm run build` script (Note: the production task does not fire up the express server, and won't provide you with browser-sync's live reloading. Simply use `npm run dev` during development. More information below)
18
18
19
-
Now that `gulp dev` is running, the server is up as well and serving files from the `/build` directory. Any changes in the `/app` directory will be automatically processed by Gulp and the changes will be injected to any open browsers pointed at the proxy address.
19
+
Now that `npm run dev` is running, the server is up as well and serving files from the `/build` directory. Any changes in the `/app` directory will be automatically processed by Gulp and the changes will be injected to any open browsers pointed at the proxy address.
20
20
21
21
#### Other resources
22
22
@@ -109,7 +109,7 @@ Gulp is a "streaming build system", providing a very fast and efficient method f
109
109
110
110
##### Web Server
111
111
112
-
Gulp is used here to provide a very basic node/Express web server for viewing and testing your application as you build. It serves static files from the `build/` directory, leaving routing up to AngularJS. All Gulp tasks are configured to automatically reload the server upon file changes. The application is served to `localhost:3002` once you run the `gulp` task. To take advantage of the fast live reload injection provided by browser-sync, you must load the site at the proxy address (within this boilerplate will by default be `localhost:3000`). To change the settings related to live-reload or browser-sync, you can access the UI at `localhost:3001`.
112
+
Gulp is used here to provide a very basic node/Express web server for viewing and testing your application as you build. It serves static files from the `build/` directory, leaving routing up to AngularJS. All Gulp tasks are configured to automatically reload the server upon file changes. The application is served to `localhost:3002` once you run the `npm run dev` script. To take advantage of the fast live reload injection provided by browser-sync, you must load the site at the proxy address (within this boilerplate will by default be `localhost:3000`). To change the settings related to live-reload or browser-sync, you can access the UI at `localhost:3001`.
113
113
114
114
##### Scripts
115
115
@@ -132,7 +132,7 @@ Just one plugin is necessary for processing our SASS files, and that is `gulp-sa
132
132
133
133
##### Images
134
134
135
-
Any images placed within `/app/images` will be automatically copied to the `build/images` directory. If running `gulp prod`, they will also be compressed via imagemin.
135
+
Any images placed within `/app/images` will be automatically copied to the `build/images` directory. If running `npm run build`, they will also be compressed via imagemin.
136
136
137
137
##### Views
138
138
@@ -142,17 +142,17 @@ Files inside `/app/views/`, on the other hand, go through a slightly more comple
142
142
143
143
##### Watching files
144
144
145
-
All of the Gulp processes mentioned above are run automatically when any of the corresponding files in the `/app` directory are changed, and this is thanks to our Gulp watch tasks. Running `gulp dev` will begin watching all of these files, while also serving to `localhost:3002`, and with browser-sync proxy running at `localhost:3000` (by default).
145
+
All of the Gulp processes mentioned above are run automatically when any of the corresponding files in the `/app` directory are changed, and this is thanks to our Gulp watch tasks. Running `npm run dev` will begin watching all of these files, while also serving to `localhost:3002`, and with browser-sync proxy running at `localhost:3000` (by default).
146
146
147
147
##### Production Task
148
148
149
-
Just as there is the `gulp dev`task for development, there is also a `gulp prod` task for putting your project into a production-ready state. This will run each of the tasks, while also adding the image minification task discussed above. There is also an empty `gulp deploy` task that is included when running the production task. This deploy task can be fleshed out to automatically push your production-ready site to your hosting setup.
149
+
Just as there is the `npm run dev`command for development, there is also a `npm run build` command for putting your project into a production-ready state. This will run each of the tasks, while also adding the image minification task discussed above. There is also an empty deploy task (run with `npm run deploy`) that is included when running the production task. This deploy task can be fleshed out to automatically push your production-ready site to your hosting setup.
150
150
151
151
**Reminder:** When running the production task, gulp will not fire up the express server and serve your index.html. This task is designed to be run before the `deploy` step that may copy the files from `/build` to a production web server.
152
152
153
153
##### Pre-compressing text assets
154
154
155
-
When running with `gulp prod`, a pre-compressed file is generated in addition to uncompressed file (.html.gz, .js.gz, css.gz). This is done to enable web servers serve compressed content without having to compress it on the fly. Pre-compression is handled by `gzip` task.
155
+
When building with `npm run build`, a pre-compressed file is generated in addition to uncompressed file (.html.gz, .js.gz, css.gz). This is done to enable web servers serve compressed content without having to compress it on the fly. Pre-compression is handled by `gzip` task.
156
156
157
157
##### Testing
158
158
@@ -164,7 +164,7 @@ A Gulp tasks also exists for running the test framework (discussed in detail bel
164
164
165
165
This boilerplate also includes a simple framework for unit and end-to-end (e2e) testing via [Karma](http://karma-runner.github.io/) and [Jasmine](http://jasmine.github.io/). In order to test AngularJS modules, the [angular.mocks](https://docs.angularjs.org/api/ngMock/object/angular.mock) module is used.
166
166
167
-
All of the tests can be run at once with the command `gulp test`. However, the tests are broken up into two main categories:
167
+
All of the tests can be run at once with the command `npm test`. However, the tests are broken up into two main categories:
168
168
169
169
##### End-to-End (e2e) Tests
170
170
@@ -177,7 +177,7 @@ In this boilerplate, two end-to-end test examples are provided:
177
177
178
178
More examples can be seen at the above link for Protractor.
179
179
180
-
All e2e tests are run with `gulp protractor`.
180
+
All e2e tests are run with `npm run protractor`.
181
181
182
182
##### Unit Tests
183
183
@@ -190,4 +190,4 @@ An example test is provided for the following types of AngularJS modules:
190
190
-`unit/directives/example_spec.js`
191
191
-`unit/constants_spec.js`
192
192
193
-
All unit tests are run with `gulp unit`. When running unit tests, code coverage is simultaneously calculated and output as an HTML file to the `/coverage` directory.
193
+
All unit tests are run with `npm run unit`. When running unit tests, code coverage is simultaneously calculated and output as an HTML file to the `/coverage` directory.
0 commit comments