Skip to content

Commit d162659

Browse files
committed
feat(@angular/cli): add ng4 option to ng new
This allows to create a project with Angular 4 in the template. Also fixes a few issues with ng4.
1 parent ed9c623 commit d162659

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export default Task.extend({
7171
inlineStyle: commandOptions.inlineStyle,
7272
inlineTemplate: commandOptions.inlineTemplate,
7373
ignoredUpdateFiles: ['favicon.ico'],
74+
ng4: commandOptions.ng4,
7475
skipGit: commandOptions.skipGit,
7576
skipTests: commandOptions.skipTests
7677
};

tests/e2e/setup/500-create-project.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function() {
2424
} else {
2525
// Otherwise create a project from scratch.
2626
createProject = Promise.resolve()
27-
.then(() => ng('new', 'test-project', '--skip-npm', argv['ng4'] ? '--ng4' : '--'))
27+
.then(() => ng('new', 'test-project', '--skip-npm', ...(argv['ng4'] ? ['--ng4'] : [])))
2828
.then(() => expectFileToExist(join(process.cwd(), 'test-project')))
2929
.then(() => process.chdir('./test-project'));
3030
}

0 commit comments

Comments
 (0)