Skip to content

Commit 061fc54

Browse files
committed
chore(docs): add webpack update instructions
1 parent 67e70a0 commit 061fc54

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ This project is very much still a work in progress.
1616
The CLI is now in beta.
1717
If you wish to collaborate while the project is still young, check out [our issue list](https://github.com/angular/angular-cli/issues).
1818

19+
## Webpack preview release update
20+
21+
We're updating the build system in Angular-CLI to use webpack instead of Broccoli.
22+
23+
You can install and update your projects using [these instructions](https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md).
24+
1925
## Prerequisites
2026

2127
The generated project has dependencies that require **Node 4 or greater**.

WEBPACK_UPDATE.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Upgrading from [email protected] to the angular-cli@webpack
2+
3+
To update `angular-cli` to the webpack preview, you must update both the global package, project's local package and your project files.
4+
5+
## Global package:
6+
```
7+
npm uninstall -g angular-cli
8+
npm cache clean
9+
npm install -g angular-cli@webpack
10+
```
11+
12+
## Local project package:
13+
```
14+
rm -rf node_modules dist tmp typings
15+
npm install --save-dev angular-cli@webpack
16+
```
17+
18+
## Project files
19+
20+
You will need to run `ng init` to check for changes in all the auto-generated files created by `ng new` and allow you to update yours. You are offered four choices for each changed file: `y` (overwrite), `n` (don't overwrite), `d` (show diff between your file and the updated file) and `h` (help).
21+
22+
Carefully read the diffs for each code file, and either accept the changes or incorporate them manually after `ng init` finishes.
23+
24+
You can find a sample github diff of the changes introduced between a beta.10 and webpack preview project at https://github.com/filipesilva/angular-cli-webpack-upgrade/commit/HEAD.
25+
26+
Here is a summary of the file changes:
27+
28+
1. Updated files:
29+
* `./config/karma.conf.js` - `frameworks`/`plugins`/`files`/`exclude`/`preprocessors` entries changed, added `angularCliConfig` entry.
30+
* `./e2e/tsconfig.json` - property cleanup, changed `outdir`, added `typeRoots`
31+
* `./package.json` - removed typings postinstall script, removed `ember-cli-inject-live-reload`/`es6-shim`/`systemjs` dependencies, added `core-js`/`ts-helpers` dependencies, updated `angular-cli`/`codelyzer`/`ts-node`/`ts-lint`/`typescript` devDependencies, added `@types/jasmine`/`@types/protractor`/`karma-coverage` devDependencies.
32+
* `./src/app/app.component.ts` (and all other components) - removed `module.id`.
33+
* `./src/app/index.ts` - import adjusted due to environment files moving (see below).
34+
* `./src/index.html` - removed templating tags and `SystemJS` import script.
35+
* `./src/app/tsconfig.json` - property cleanup, changed `outdir`/`module`, added `libs`/`typeRoots`/`types`
36+
* `./src/typings.d.ts` - added `System`/`require` typings, removed `typings` ref
37+
1. New files:
38+
* `./src/polyfills.ts` - loads needed polyfills before main app
39+
* `./src/test.ts` - unit test spec loader
40+
1. These files have moved to `./src/app/environments/`:
41+
* `./config/environment.dev.ts`
42+
* `./config/environment.prod.ts`
43+
* `./src/app/environment.ts`
44+
45+
Lastly, you can delete these files as they are not needed anymore.
46+
* `./config/karma-test-shim.js`
47+
* `./src/system-config.ts`
48+
* `./angular-cli-build.js`
49+
* `./typings.json`
50+
* `./.clang-format` (if present)

0 commit comments

Comments
 (0)