Skip to content

Commit e9d93b7

Browse files
authored
Merge branch 'master' into node-6-cleanup
2 parents fd5e233 + 5972f1a commit e9d93b7

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

packages/@angular/cli/commands/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const BaseBuildCommandOptions: any = [
1515
{ name: 'aot', type: Boolean },
1616
{ name: 'sourcemap', type: Boolean, aliases: ['sm'] },
1717
{ name: 'vendor-chunk', type: Boolean, default: true, aliases: ['vc'] },
18-
{ name: 'base-href', type: String, default: '/', aliases: ['bh'] },
18+
{ name: 'base-href', type: String, aliases: ['bh'] },
1919
{ name: 'deploy-url', type: String, aliases: ['d'] },
2020
{ name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
2121
{ name: 'progress', type: Boolean, default: true, aliases: ['pr'] },

packages/@angular/cli/ember-cli/lib/models/command.js

+1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ Command.prototype.mergeDuplicateOption = function(key) {
183183
*/
184184
Command.prototype.normalizeOption = function(option) {
185185
option.key = camelize(option.name);
186+
option.aliases = (option.aliases || []).concat(camelize(option.name));
186187
option.required = option.required || false;
187188
return option;
188189
};

packages/@angular/cli/tasks/serve.ts

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export default Task.extend({
2424
const appConfig = projectConfig.apps[0];
2525

2626
const outputPath = serveTaskOptions.outputPath || appConfig.outDir;
27+
if (this.project.root === outputPath) {
28+
throw new SilentError ('Output path MUST not be project root directory!');
29+
}
2730
rimraf.sync(path.resolve(this.project.root, outputPath));
2831

2932
const serveDefaults = {

tests/e2e/tests/build/aot/aot-i18n.ts

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export default function() {
2222
'<h1 i18n="An introduction header for this sample">Hello i18n!</h1>'))
2323
.then(() => ng('build', '--aot', '--i18n-file', 'src/locale/messages.fr.xlf', '--i18n-format',
2424
'xlf', '--locale', 'fr'))
25+
.then(() => ng('build', '--aot', '--i18nFile', 'src/locale/messages.fr.xlf', '--i18nFormat',
26+
'xlf', '--locale', 'fr'))
2527
.then(() => expectFileToMatch('dist/main.bundle.js', /Bonjour i18n!/))
2628
.then(() => ng('build', '--aot'))
2729
.then(() => expectToFail(() => expectFileToMatch('dist/main.bundle.js', /Bonjour i18n!/)))

tests/e2e/tests/build/rebuild-css-change.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export default function() {
1717
return silentExecAndWaitForOutputToMatch('ng', ['serve'], webpackGoodRegEx)
1818
// Should trigger a rebuild.
1919
.then(() => exec('touch', 'src/main.ts'))
20-
.then(() => waitForAnyProcessOutputToMatch(webpackBadRegEx, 1000))
20+
.then(() => waitForAnyProcessOutputToMatch(webpackBadRegEx, 5000))
2121
.then(() => waitForAnyProcessOutputToMatch(webpackGoodRegEx, 5000))
2222
.then(() => appendToFile('src/app/app.component.css', ':host { color: blue; }'))
23-
.then(() => waitForAnyProcessOutputToMatch(webpackBadRegEx, 1000))
23+
.then(() => waitForAnyProcessOutputToMatch(webpackBadRegEx, 5000))
2424
.then(() => waitForAnyProcessOutputToMatch(webpackGoodRegEx, 5000))
2525
.then(() => killAllProcesses(), (err: any) => {
2626
killAllProcesses();

tests/e2e/tests/build/rebuild.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function() {
2222
// Should trigger a rebuild.
2323
.then(() => exec('touch', 'src/main.ts'))
2424
.then(() => waitForAnyProcessOutputToMatch(
25-
/webpack: bundle is now INVALID|webpack: Compiling.../, 1000))
25+
/webpack: bundle is now INVALID|webpack: Compiling.../, 5000))
2626
.then(() => waitForAnyProcessOutputToMatch(
2727
/webpack: bundle is now VALID|webpack: Compiled successfully./, 5000))
2828
// Count the bundles.
@@ -61,7 +61,7 @@ export default function() {
6161
`))
6262
// Should trigger a rebuild with a new bundle.
6363
.then(() => waitForAnyProcessOutputToMatch(
64-
/webpack: bundle is now INVALID|webpack: Compiling.../, 1000))
64+
/webpack: bundle is now INVALID|webpack: Compiling.../, 5000))
6565
.then(() => waitForAnyProcessOutputToMatch(
6666
/webpack: bundle is now VALID|webpack: Compiled successfully./, 5000))
6767
// Count the bundles.

0 commit comments

Comments
 (0)