Skip to content

Commit

Permalink
feat(@schematics/angular): rename experimentalIvy to enableIvy
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva authored and mgechev committed Feb 26, 2019
1 parent 3d6ae63 commit 0596664
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Expand Up @@ -7,7 +7,7 @@
"exclude": [
"test.ts",
"**/*.spec.ts"
]<% if (experimentalIvy) { %>,
]<% if (enableIvy) { %>,
"angularCompilerOptions": {
"enableIvy": true
}<% } %>
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/index.ts
Expand Up @@ -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(),
]);
Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/angular/application/index_spec.ts
Expand Up @@ -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');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/schema.json
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/ng-new/index.ts
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/schematics/angular/ng-new/schema.json
Expand Up @@ -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
},
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/setup/500-create-project.ts
Expand Up @@ -11,7 +11,7 @@ export default async function() {
const extraArgs = [];

if (argv['ivy']) {
extraArgs.push('--experimentalIvy');
extraArgs.push('--enable-ivy');
}

if (argv.noproject) {
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/tests/experimental/ivy-lazy-load.ts
Expand Up @@ -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';`);
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/tests/experimental/ivy.ts
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/utils/project.ts
Expand Up @@ -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'));
Expand Down

0 comments on commit 0596664

Please sign in to comment.