feat(@schematics/angular): rename experimentalIvy to enableIvy

Followup to https://github.com/angular/angular/pull/28569#discussion_r259558085
This commit is contained in:
Filipe Silva 2019-02-26 11:49:09 +00:00 committed by Minko Gechev
parent 3d6ae63178
commit 05966646e7
10 changed files with 12 additions and 12 deletions

View File

@ -7,7 +7,7 @@
"exclude": [
"test.ts",
"**/*.spec.ts"
]<% if (experimentalIvy) { %>,
]<% if (enableIvy) { %>,
"angularCompilerOptions": {
"enableIvy": true
}<% } %>

View File

@ -430,7 +430,7 @@ export default function (options: ApplicationOptions): Rule {
move(sourceDir),
]), MergeStrategy.Overwrite),
options.minimal ? noop() : schematic('e2e', e2eOptions),
options.experimentalIvy ? addPostInstallScript() : noop(),
options.enableIvy ? addPostInstallScript() : noop(),
options.skipPackageJson ? noop() : addDependenciesToPackageJson(options),
options.lintFix ? applyLintFix(sourceDir) : noop(),
]);

View File

@ -208,8 +208,8 @@ describe('Application Schematic', () => {
expect(pkg.devDependencies['typescript']).toEqual(latestVersions.TypeScript);
});
it(`should add a postinstall in package.json when 'experimentalIvy'`, () => {
const tree = schematicRunner.runSchematic('application', { ...defaultOptions, experimentalIvy: true }, workspaceTree);
it(`should add a postinstall in package.json when 'enableIvy'`, () => {
const tree = schematicRunner.runSchematic('application', { ...defaultOptions, enableIvy: true }, workspaceTree);
const pkg = JSON.parse(tree.readContent('/package.json'));
expect(pkg.scripts.postinstall).toEqual('ivy-ngcc');
});

View File

@ -19,7 +19,7 @@
},
"x-prompt": "What name would you like to use for the application?"
},
"experimentalIvy": {
"enableIvy": {
"description": "EXPERIMENTAL: True to create a new app that uses the Ivy rendering engine.",
"type": "boolean",
"default": false

View File

@ -46,7 +46,7 @@ export default function (options: NgNewOptions): Rule {
const applicationOptions: ApplicationOptions = {
projectRoot: '',
name: options.name,
experimentalIvy: options.experimentalIvy,
enableIvy: options.enableIvy,
inlineStyle: options.inlineStyle,
inlineTemplate: options.inlineTemplate,
prefix: options.prefix,

View File

@ -18,8 +18,8 @@
},
"x-prompt": "What name would you like to use for the new workspace and initial project?"
},
"experimentalIvy": {
"description": "EXPERIMENTAL: When true, creates a new app that uses the Ivy rendering engine.",
"enableIvy": {
"description": "When true, creates a new app that uses the Ivy rendering engine.",
"type": "boolean",
"default": false
},

View File

@ -11,7 +11,7 @@ export default async function() {
const extraArgs = [];
if (argv['ivy']) {
extraArgs.push('--experimentalIvy');
extraArgs.push('--enable-ivy');
}
if (argv.noproject) {

View File

@ -11,7 +11,7 @@ import { ng } from '../../utils/process';
import { createProject } from '../../utils/project';
export default async function() {
await createProject('ivy-project', '--experimental-ivy');
await createProject('ivy-project', '--enable-ivy');
await ng('generate', 'module', 'lazy', '--routing');
await prependToFile('src/app/app.module.ts', `import { RouterModule } from '@angular/router';`);

View File

@ -17,7 +17,7 @@ export default async function() {
return;
}
try {
await createProject('ivy-project', '--experimental-ivy');
await createProject('ivy-project', '--enable-ivy');
await ngServe('--prod');

View File

@ -38,7 +38,7 @@ export async function createProject(name: string, ...args: string[]) {
const extraArgs = [];
if (argv['ivy']) {
extraArgs.push('--experimentalIvy');
extraArgs.push('--enableIvy');
}
process.chdir(getGlobalVariable('tmp-root'));