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
Copy file name to clipboardExpand all lines: README.md
+11-18Lines changed: 11 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,7 +217,7 @@ __LiveReload__
217
217
218
218
By default, LiveReload will watch for changes in your `www/` directory,
219
219
excluding `www/lib/`. To change this, you can specify a `watchPatterns`
220
-
property in the `ionic.project` file located in your project root to watch
220
+
property in the `ionic.config.json` file located in your project root to watch
221
221
(or not watch) for specific changes.
222
222
223
223
```json
@@ -237,38 +237,34 @@ the Grunt website.
237
237
238
238
__Gulp Integration__
239
239
240
-
When running `ionic serve`, you can have Ionic run any Gulp tasks you specify by putting them into your `ionic.project` as a `gulpStartupTasks` property as follows:
241
-
242
-
```json
243
-
{
244
-
"name": "SmoothRiders",
245
-
"gulpStartupTasks": [
246
-
"watch"
247
-
]
248
-
}
240
+
When running `ionic serve`, you can have Ionic run any Gulp tasks you specify by putting them into a gulp task called `serve:before`:
249
241
242
+
```js
243
+
gulp.task('serve:before', ['sass', 'watch']);
250
244
```
251
245
252
246
Now, when you run `ionic serve`, it will run the `watch` task while starting the Ionic server.
253
247
254
248
If you would like to disable gulp from running during serve, pass the `--nogulp` option.
255
249
250
+
Your gulpfile must be named gulpfile.js or Gulpfile.js, there is currently no support for typescript, babel or coffeescript gulp files in the 2.0 CLI
251
+
256
252
NOTE:
257
253
258
254
```bash
259
255
$ ionic setup sass
260
256
```
261
257
262
-
will add a `watchPatterns` propery with the default values to your `ionic.project`
263
-
file that you can then edit, in addition to the `gulpStartupTasks` property
258
+
will add a `watchPatterns` propery with the default values to your `ionic.config.json`
259
+
file that you can then edit, in addition to the `serve:before` gulp task
264
260
described in the [Using Sass](https://github.com/driftyco/ionic-cli/blob/master/README.md#using-sass) section.
265
261
266
262
267
263
__Service Proxies:__
268
264
269
265
The `serve` command can add some proxies to the http server. These proxies are useful if you are developing in the browser and you need to make calls to an external API. With this feature you can proxy request to the external api through the ionic http server preventing the `No 'Access-Control-Allow-Origin' header is present on the requested resource` error.
270
266
271
-
In the `ionic.project` file you can add a property with an array of proxies you want to add. The proxies are object with the following properties:
267
+
In the `ionic.config.json` file you can add a property with an array of proxies you want to add. The proxies are object with the following properties:
272
268
273
269
*`path`: string that will be matched against the beginning of the incoming request URL.
274
270
*`proxyUrl`: a string with the url of where the proxied request should go.
@@ -341,7 +337,7 @@ And of course, it supports Live Reload and all the other goodies we've added ove
341
337
342
338
## Serving an alternate document root
343
339
344
-
If you'd like to test your app in the browser and you use a folder other than the default of `www`, you can specify this folder in your `ionic.project` file.
340
+
If you'd like to test your app in the browser and you use a folder other than the default of `www`, you can specify this folder in your `ionic.config.json` file.
345
341
346
342
You might also want to have the document root be created if you use some sort of build system, we suggest using `createDocumentRoot` for that so that `ionic serve` will create that folder for you.
347
343
@@ -350,9 +346,6 @@ It is also advised you specify the watch patterns for this document root as well
350
346
```json
351
347
{
352
348
"name": "SmoothRiders",
353
-
"gulpStartupTasks": [
354
-
"watch"
355
-
],
356
349
"documentRoot": "app",
357
350
"createDocumentRoot": "app",
358
351
"watchPatterns": [
@@ -425,7 +418,7 @@ By default, starter projects are hooked up to Ionic's precompiled CSS file, whic
425
418
2. Remove `<link href="lib/ionic/css/ionic.css" rel="stylesheet">` from the `<head>` of the root `index.html` file.
426
419
3. Remove `<link href="css/style.css" rel="stylesheet">` from the `<head>` of the root `index.html` file.
427
420
4. Add `<link href="css/ionic.app.css" rel="stylesheet">` to the `<head>` of the root `index.html` file.
428
-
5. In the `ionic.project` file, add the JavaScript property `"gulpStartupTasks": ["sass", "watch"]` (this can also be customized to whatever gulp tasks you'd like).
421
+
5. In your `serve:before` gulp task, add the `sass` task `gulp.task('serve:before', ['sass', 'watch']);` (this can also be customized to whatever gulp tasks you'd like).
0 commit comments