Skip to content

Commit d22c78e

Browse files
mattlewis92jthoms1
authored andcommitted
docs(readme): update docs to reflect CLI 2.0 (#1366)
Looks good. Thank you!
1 parent 8df45a2 commit d22c78e

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ __LiveReload__
217217

218218
By default, LiveReload will watch for changes in your `www/` directory,
219219
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
221221
(or not watch) for specific changes.
222222

223223
```json
@@ -237,38 +237,34 @@ the Grunt website.
237237

238238
__Gulp Integration__
239239

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`:
249241

242+
```js
243+
gulp.task('serve:before', ['sass', 'watch']);
250244
```
251245

252246
Now, when you run `ionic serve`, it will run the `watch` task while starting the Ionic server.
253247

254248
If you would like to disable gulp from running during serve, pass the `--nogulp` option.
255249

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+
256252
NOTE:
257253

258254
```bash
259255
$ ionic setup sass
260256
```
261257

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
264260
described in the [Using Sass](https://github.com/driftyco/ionic-cli/blob/master/README.md#using-sass) section.
265261

266262

267263
__Service Proxies:__
268264

269265
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.
270266

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:
272268

273269
* `path`: string that will be matched against the beginning of the incoming request URL.
274270
* `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
341337

342338
## Serving an alternate document root
343339

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.
345341

346342
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.
347343

@@ -350,9 +346,6 @@ It is also advised you specify the watch patterns for this document root as well
350346
```json
351347
{
352348
"name": "SmoothRiders",
353-
"gulpStartupTasks": [
354-
"watch"
355-
],
356349
"documentRoot": "app",
357350
"createDocumentRoot": "app",
358351
"watchPatterns": [
@@ -425,7 +418,7 @@ By default, starter projects are hooked up to Ionic's precompiled CSS file, whic
425418
2. Remove `<link href="lib/ionic/css/ionic.css" rel="stylesheet">` from the `<head>` of the root `index.html` file.
426419
3. Remove `<link href="css/style.css" rel="stylesheet">` from the `<head>` of the root `index.html` file.
427420
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).
429422

430423

431424
# Ionic Cloud services

0 commit comments

Comments
 (0)