diff --git a/README.md b/README.md index 6f742d07e4bd..154fb4d0b58f 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ The CLI supports routing in several ways: The `--routing` option also generates a default component with the same name as the module. -- You can use the `--routing` option with `ng new` or `ng init` to create a `app-routing.module.ts` file when you create or initialize a project. +- You can use the `--routing` option with `ng new` to create a `app-routing.module.ts` file when you create or initialize a project. ### Creating a build @@ -440,12 +440,12 @@ Local project package: rm -rf node_modules dist # use rmdir on Windows npm install --save-dev angular-cli@latest npm install -ng init +ng update ``` -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). +Running `ng update` 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. +Carefully read the diffs for each code file, and either accept the changes or incorporate them manually after `ng update` finishes. **The main cause of errors after an update is failing to incorporate these updates into your code**. diff --git a/docs/design/docker-deploy.md b/docs/design/docker-deploy.md index 256368594ab0..97868dca9ace 100644 --- a/docs/design/docker-deploy.md +++ b/docs/design/docker-deploy.md @@ -15,7 +15,7 @@ Provide tasks for common Docker workflows: 1. Requires user to have Docker CLI tools installed. (See also: ["Implementation Approaches"](#implementation-approaches)) -1. User is free to use the Angular CLI without Docker (and vice versa). By default, do not generate Docker files upon creation of a new project (`ng new`, `ng init`). +1. User is free to use the Angular CLI without Docker (and vice versa). By default, do not generate Docker files upon creation of a new project (`ng new`). 1. Don't recreate the wheel. Docker CLI tools are very full featured on their own. Implement the common Docker use cases that make it convenient for Angular applications. 1. Don't inhibit users from using the standalone Docker CLI tools for other use cases. 1. Assumes 1:1 Dockerfile with the Angular project. Support for multiple services under the same project is outside the scope of this initial design. diff --git a/docs/documentation/overview.md b/docs/documentation/overview.md index 3c604ca7f2e5..a8d754bad82f 100644 --- a/docs/documentation/overview.md +++ b/docs/documentation/overview.md @@ -109,7 +109,7 @@ your app. ### Additional Commands * [ng new](new) -* [ng init](init) +* [ng update](update) * [ng serve](serve) * [ng generate](generate) * [ng test](test) diff --git a/docs/documentation/init.md b/docs/documentation/update.md similarity index 90% rename from docs/documentation/init.md rename to docs/documentation/update.md index 9e667bc2861a..be536099187b 100644 --- a/docs/documentation/init.md +++ b/docs/documentation/update.md @@ -1,9 +1,9 @@ -# ng init +# ng update ## Overview -`ng init [name]` initializes, or re-initializes, an angular application. +`ng update [name]` updates, initializes, or re-initializes, an angular application. Initialization is done in-place, meaning that the generated application is initialized in the current directory. diff --git a/packages/angular-cli/commands/init.ts b/packages/angular-cli/commands/init.ts index 566fc3013897..fcf85e53fe73 100644 --- a/packages/angular-cli/commands/init.ts +++ b/packages/angular-cli/commands/init.ts @@ -3,7 +3,7 @@ const Command = require('../ember-cli/lib/models/command'); const InitCommand: any = Command.extend({ name: 'init', description: 'Creates a new angular-cli project in the current folder.', - aliases: ['i'], + aliases: ['u', 'update', 'i'], works: 'everywhere', availableOptions: [ diff --git a/tests/acceptance/init.spec.js b/tests/acceptance/init.spec.js index 4e02260cedd6..adb73e65953a 100644 --- a/tests/acceptance/init.spec.js +++ b/tests/acceptance/init.spec.js @@ -20,7 +20,7 @@ var existsSync = require('exists-sync'); var defaultIgnoredFiles = Blueprint.ignoredFiles; -describe('Acceptance: ng init', function () { +describe('Acceptance: ng update', function () { this.timeout(20000); beforeEach(function () { @@ -94,14 +94,14 @@ describe('Acceptance: ng init', function () { }); } - it('ng init', function () { + it('ng init does the same as ng update', function () { return ng([ 'init', '--skip-npm' ]).then(confirmBlueprinted); }); - it('ng init can run in created folder', function () { + it('ng update can run in created folder', function () { return tmp.setup('./tmp/foo') .then(function () { process.chdir('./tmp/foo'); @@ -176,7 +176,7 @@ describe('Acceptance: ng init', function () { .then(confirmBlueprinted); }); - it('ng init --inline-template does not generate a template file', () => { + it('ng update --inline-template does not generate a template file', () => { return ng(['init', '--skip-npm', '--skip-git', '--inline-template']) .then(() => { const templateFile = path.join('src', 'app', 'app.component.html'); @@ -184,7 +184,7 @@ describe('Acceptance: ng init', function () { }); }); - it('ng init --inline-style does not gener a style file', () => { + it('ng update --inline-style does not gener a style file', () => { return ng(['init', '--skip-npm', '--skip-git', '--inline-style']) .then(() => { const styleFile = path.join('src', 'app', 'app.component.css');