From ac833c188c998deb7e2a42f1d533ab34a93a01e3 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 13 Jun 2016 16:19:47 +0100 Subject: [PATCH] chore: add changelog and upgrade guide --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ README.md | 41 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..9abc840911a6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ +## Always follow the [upgrade guide](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md#updating-angular-cli) when upgrading to a new version. The changelog does not list breaking changes that are fixed via the update procedure. + + +# 1.0.0-beta.6 (2016-06-13) + +### Features +- Admin elevation no longer required on Windows (https://github.com/angular/angular-cli/pull/905). +- Automatically add SASS/Stylus if project is initialized with `--style={sass|scss|styl}` (https://github.com/angular/angular-cli/pull/998). +- Allow any number of env files (https://github.com/angular/angular-cli/pull/913). + +### Bug Fixes +- Fix adding 3rd party libs without package format (https://github.com/angular/angular-cli/pull/1028/commits/065e98f40384f8b28dcaf84028c411043697ff11). +- Fix github deploy deep links (https://github.com/angular/angular-cli/pull/1020). +- Fix `ng e2e` exit code (https://github.com/angular/angular-cli/pull/1025). +- Fix missing vendor file (https://github.com/angular/angular-cli/pull/972). +- Fix github user pages base href (https://github.com/angular/angular-cli/pull/965). + +### BREAKING CHANGES +- `AppComponent` is now simply `AppComponent`, and it's selector is now `app-root` (https://github.com/angular/angular-cli/pull/1042). + +- Route generation is temporarily disabled while we move to the [recently announce router](http://angularjs.blogspot.ie/2016/06/improvements-coming-for-routing-in.html)(https://github.com/angular/angular-cli/pull/992). It is recommended that users manually move to this router in all new projects. + + +# 1.0.0-beta.5 (2016-05-19) + +### Known Issues + +- `ng new -mobile` fails npm install (https://github.com/angular/angular-cli/issues/958). +- Adding 3rd party libs without SystemJS package format breaks prod mode (https://github.com/angular/angular-cli/issues/951). +- Deep links do not work on Github pages deploys (https://github.com/angular/angular-cli/issues/995). +- `ng e2e` doesn't return error exit code on test failures (https://github.com/angular/angular-cli/issues/1017). +- `ng build -prod` fails on mobile projects due to missing vendor file (https://github.com/angular/angular-cli/issues/847). +- Github deploy to user pages doesn't use correct base href (https://github.com/angular/angular-cli/pull/965). +- `ng test` on windows hits the file discriptor limit (https://github.com/angular/angular-cli/issues/977). +- `ng serve/build/test` need admin elevation on Windows (https://github.com/angular/angular-cli/issues/641). \ No newline at end of file diff --git a/README.md b/README.md index 3245da797bbe..7fb9e7f58cb6 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,10 @@ The generated project has dependencies that require **Node 4 or greater**. * [Installation](#installation) * [Usage](#usage) * [Generating a New Project](#generating-and-serving-an-angular2-project-via-a-development-server) -* [Generating Components, Directives, Pipes and Services](#generating-other-scaffolds) +* [Generating Components, Directives, Pipes and Services](#generating-components-directives-pipes-and-services) * [Generating a Route](#generating-a-route) * [Creating a Build](#creating-a-build) +* [Environments](#environments) * [Running Unit Tests](#running-unit-tests) * [Running End-to-End Tests](#running-end-to-end-tests) * [Deploying the App via GitHub Pages](#deploying-the-app-via-github-pages) @@ -36,7 +37,9 @@ The generated project has dependencies that require **Node 4 or greater**. * [Commands autocompletion](#commands-autocompletion) * [CSS preprocessor integration](#css-preprocessor-integration) * [3rd Party Library Installation](#3rd-party-library-installation) +* [Updating angular-cli](#updating-angular-cli) * [Known Issues](#known-issues) +* [Development Hints for hacking on angular-cli](#development-hints-for-hacking-on-angular-cli) ## Installation @@ -66,7 +69,7 @@ You can configure the default HTTP port and the one used by the LiveReload serve ng serve --port 4201 --live-reload-port 49153 ``` -### Generating other scaffolds +### Generating Components, Directives, Pipes and Services You can use the `ng generate` (or just `ng g`) command to generate Angular components: @@ -90,6 +93,9 @@ Component | `ng g component my-new-component` Directive | `ng g directive my-new-directive` Pipe | `ng g pipe my-new-pipe` Service | `ng g service my-new-service` +Class | `ng g class my-new-class` +Interface | `ng g interface my-new-interface` +Enum | `ng g enum my-new-enum` ### Generating a route @@ -130,6 +136,10 @@ current cli environment. Environment defaults to `dev`, but you can generate a production build via the `-prod` flag in either `ng build -prod` or `ng serve -prod`. +You can also add your own env files other than `dev` and `prod` by creating a +`src/client/app/environment.{NAME}.ts` and use them by using the `--env=NAME` +flag on the build/serve commands. + ### Running unit tests ```bash @@ -237,6 +247,33 @@ The `Angular2App`'s options argument has `sassCompiler`, `lessCompiler`, `stylus The installation of 3rd party libraries are well described at our [Wiki Page](https://github.com/angular/angular-cli/wiki/3rd-party-libs) +### Updating angular-cli + +To update `angular-cli` to a new version, you must update both the global package and your project's local package. + +Global package: +``` +npm uninstall -g angular-cli +npm cache clean +npm install -g angular-cli@latest +``` + +Local project package: +``` +rm -rf node_modules dist tmp +npm install --save-dev angular-cli@latest +ng init +``` + +Running `ng init` will 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). + +Carefully read the diffs for each code file, and either accept the changes or incorporate them manually after `ng init` finishes. + +**The main cause of errors after an update is failing to incorporate these updates into your code**. + +You can find more details about changes between versions in [CHANGELOG.md](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md). + + ## Known issues This project is currently a prototype so there are many known issues. Just to mention a few: