Skip to content

Commit e949b16

Browse files
Merge pull request #132 from angular/master
Update upstream
2 parents fff0cd2 + 67f5cee commit e949b16

File tree

7 files changed

+59
-19
lines changed

7 files changed

+59
-19
lines changed

docs/documentation/serve.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ All the build Options are available in serve, below are the additional options.
7474
<code>--port</code> (aliases: <code>-p</code>) <em>default value: 4200</em>
7575
</p>
7676
<p>
77-
Port to listen to for serving.
77+
Port to listen to for serving. <code>--port 0</code> will get a free port
7878
</p>
7979
</details>
8080

docs/documentation/stories/budgets.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ of your application stay within boundries which you set.
4949
## Specifying sizes
5050

5151
Available formats:
52-
123 - size in bytes
53-
123b - size in bytes
54-
123kb - size in kilobytes
55-
123mb - size in megabytes
56-
12% - percentage
52+
53+
- `123` - size in bytes
54+
- `123b` - size in bytes
55+
- `123kb` - size in kilobytes
56+
- `123mb` - size in megabytes
57+
- `12%` - percentage
5758

5859
## NOTES
5960

packages/@angular/cli/bin/ng-update-message.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ if (found) {
3434
// eslint-disable-next-line no-console
3535
console.error(`\u001b[31m
3636
${'='.repeat(80)}
37-
An old CLI configuration has been detected, which needs to be updated to the latest version.
37+
The Angular CLI configuration format has been changed, and your existing configuration can
38+
be updated automatically by running the following command:
3839
39-
Please run the following command to update this workspace:
4040
ng update @angular/cli --migrate-only --from=1
4141
${'='.repeat(80)}
4242
\u001b[39m`.replace(/^ {4}/gm, ''));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { tags } from '@angular-devkit/core';
2+
import { Command, Option } from '../models/command';
3+
4+
5+
export default class EjectCommand extends Command {
6+
public readonly name = 'eject';
7+
public readonly description = 'Temporarily disabled. Ejects your app and output the proper '
8+
+ 'webpack configuration and scripts.';
9+
public readonly arguments: string[] = [];
10+
public readonly options: Option[] = [];
11+
12+
run(_options: any) {
13+
this.logger.info(tags.stripIndents`
14+
The 'eject' command has been temporarily disabled, as it is not yet compatible with the new
15+
angular.json format. The new configuration format provides further flexibility to modify the
16+
configuration of your workspace without ejecting. Ejection will be re-enabled in a future
17+
release of the CLI.
18+
19+
If you need to eject today, use CLI 1.7 to eject your project.
20+
`);
21+
}
22+
}

packages/@angular/cli/lib/cli/index.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,32 @@ const Project = require('../../ember-cli/lib/models/project');
88

99
function loadCommands() {
1010
return {
11+
// Schematics commands.
1112
'add': require('../../commands/add').default,
12-
'build': require('../../commands/build').default,
13-
'serve': require('../../commands/serve').default,
1413
'new': require('../../commands/new').default,
1514
'generate': require('../../commands/generate').default,
15+
'update': require('../../commands/update').default,
16+
17+
// Architect commands.
18+
'build': require('../../commands/build').default,
19+
'serve': require('../../commands/serve').default,
1620
'test': require('../../commands/test').default,
1721
'e2e': require('../../commands/e2e').default,
18-
'help': require('../../commands/help').default,
1922
'lint': require('../../commands/lint').default,
20-
'version': require('../../commands/version').default,
21-
'doc': require('../../commands/doc').default,
2223
'xi18n': require('../../commands/xi18n').default,
23-
'update': require('../../commands/update').default,
2424
'run': require('../../commands/run').default,
2525

26+
// Disabled commands.
27+
'eject': require('../../commands/eject').default,
28+
2629
// Easter eggs.
2730
'make-this-awesome': require('../../commands/easter-egg').default,
2831

29-
// Configuration.
32+
// Other.
3033
'config': require('../../commands/config').default,
34+
'help': require('../../commands/help').default,
35+
'version': require('../../commands/version').default,
36+
'doc': require('../../commands/doc').default,
3137
};
3238
}
3339

packages/@angular/cli/models/command-runner.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,24 @@ export function parseOptions<T = any>(
165165
return defaults;
166166
}, {});
167167

168+
const strings = cmdOpts
169+
.filter(o => o.type === String)
170+
.map(o => o.name);
171+
172+
const numbers = cmdOpts
173+
.filter(o => o.type === Number)
174+
.map(o => o.name);
175+
176+
168177
aliases.help = ['h'];
169178
booleans.push('help');
170179

171180
const yargsOptions = {
172181
alias: aliases,
173182
boolean: booleans,
174-
default: defaults
183+
default: defaults,
184+
string: strings,
185+
number: numbers
175186
};
176187

177188
const parsedOptions = parser(args, yargsOptions);
@@ -302,9 +313,9 @@ function verifyWorkspace(command: Command, executionScope: CommandScope, root: s
302313
// If changing this message, please update the same message in
303314
// `packages/@angular/cli/bin/ng-update-message.js`
304315
throw new SilentError(tags.stripIndent`
305-
An old CLI configuration has been detected, which needs to be updated to the latest version.
316+
The Angular CLI configuration format has been changed, and your existing configuration can
317+
be updated automatically by running the following command:
306318
307-
Please run the following command to update this workspace:
308319
ng update @angular/cli --migrate-only --from=1
309320
`);
310321
}

packages/@angular/cli/upgrade/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class Version {
112112
&& !rxjsVersion.isGreaterThanOrEqualTo(new SemVer('6.0.0-beta.0'))
113113
) {
114114
console.warn(bold(red(tags.stripIndents`
115-
This project uses a temporary compatibility version of RxJs (${rxjsVersion}.
115+
This project uses a temporary compatibility version of RxJs (${rxjsVersion}).
116116
117117
Please visit the link below to find instructions on how to update RxJs.
118118
https://docs.google.com/document/d/12nlLt71VLKb-z3YaSGzUfx6mJbc34nsMXtByPUN35cg/edit#

0 commit comments

Comments
 (0)