mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +08:00
feat(@schematics/angular): rename experimentalIvy to enableIvy
Followup to https://github.com/angular/angular/pull/28569#discussion_r259558085
This commit is contained in:
parent
3d6ae63178
commit
05966646e7
@ -7,7 +7,7 @@
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
]<% if (experimentalIvy) { %>,
|
||||
]<% if (enableIvy) { %>,
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": true
|
||||
}<% } %>
|
||||
|
@ -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(),
|
||||
]);
|
||||
|
@ -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');
|
||||
});
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
},
|
||||
|
@ -11,7 +11,7 @@ export default async function() {
|
||||
const extraArgs = [];
|
||||
|
||||
if (argv['ivy']) {
|
||||
extraArgs.push('--experimentalIvy');
|
||||
extraArgs.push('--enable-ivy');
|
||||
}
|
||||
|
||||
if (argv.noproject) {
|
||||
|
@ -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';`);
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user