diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c45a72654..17abb95464 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -455,7 +455,7 @@ jobs: test_docs_examples: parameters: - ivy: + viewengine: type: boolean default: false executor: @@ -471,7 +471,7 @@ jobs: # Run examples tests. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled. # Since the parallelism is set to "5", there will be five parallel CircleCI containers. # with either "0", "1", etc as node index. This can be passed to the "--shard" argument. - - run: yarn --cwd aio example-e2e --setup --local <<# parameters.ivy >>--ivy<> --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL} --retry 2 + - run: yarn --cwd aio example-e2e --setup --local <<# parameters.viewengine >>--viewengine<> --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL} --retry 2 # This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`. aio_preview: @@ -823,8 +823,8 @@ workflows: requires: - build-npm-packages - test_docs_examples: - name: test_docs_examples_ivy - ivy: true + name: test_docs_examples_viewengine + viewengine: true requires: - build-npm-packages - aio_preview: @@ -851,7 +851,7 @@ workflows: - test_aio_local - test_aio_local_viewengine - test_docs_examples - - test_docs_examples_ivy + - test_docs_examples_viewengine # Get the artifacts to publish from the build-packages-dist job # since the publishing script expects the legacy outputs layout. - build-npm-packages diff --git a/aio/README.md b/aio/README.md index 8cb7af568d..b46467d2bf 100644 --- a/aio/README.md +++ b/aio/README.md @@ -18,8 +18,8 @@ Here are the most important tasks you might need to use: * `yarn build` - create a production build of the application (after installing dependencies, boilerplate, etc). * `yarn build-local` - same as `build`, but use `setup-local` instead of `setup`. -* `yarn build-local-with-viewengine` - same as `build-local`, but in addition also turns on `ViewEngine` mode in aio. - (Note: Docs examples run in `ViewEngine` mode by default. To turn on `ivy` mode in examples, see `yarn boilerplate:add` below.) +* `yarn build-local-with-viewengine` - same as `build-local`, but in addition also turns on `ViewEngine` (pre-Ivy) mode in aio. + (Note: To turn on `ViewEngine` mode in docs examples, see `yarn boilerplate:add:viewengine` below.) * `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary. * `yarn serve-and-sync` - run both the `docs-watch` and `start` in the same console. @@ -34,7 +34,7 @@ Here are the most important tasks you might need to use: * `yarn docs-test` - run the unit tests for the doc generation code. * `yarn boilerplate:add` - generate all the boilerplate code for the examples, so that they can be run locally. -* `yarn boilerplate:add:ivy` - same as `boilerplate:add` but also turns on `ivy` mode. +* `yarn boilerplate:add:viewengine` - same as `boilerplate:add` but also turns on `ViewEngine` (pre-Ivy) mode. * `yarn boilerplate:remove` - remove all the boilerplate code that was added via `yarn boilerplate:add`. * `yarn generate-stackblitz` - generate the stackblitz files that are used by the `live-example` tags in the docs. @@ -44,7 +44,7 @@ Here are the most important tasks you might need to use: - `--setup`: generate boilerplate, force webdriver update & other setup, then run tests. - `--local`: run e2e tests with the local version of Angular contained in the "dist" folder. _Requires `--setup` in order to take effect._ - - `--ivy`: run e2e tests in `ivy` mode. + - `--viewengine`: run e2e tests in `ViewEngine` (pre-Ivy) mode. - `--filter=foo`: limit e2e tests to those containing the word "foo". > **Note for Windows users** diff --git a/aio/content/examples/dependency-injection/example-config.json b/aio/content/examples/dependency-injection/example-config.json index d56f4ce8b0..e69de29bb2 100644 --- a/aio/content/examples/dependency-injection/example-config.json +++ b/aio/content/examples/dependency-injection/example-config.json @@ -1,13 +0,0 @@ -{ - "e2e": [ - { - "cmd": "yarn", - "args": [ - "e2e", - "--protractor-config=e2e/protractor-puppeteer.conf.js", - "--no-webdriver-update", - "--port={PORT}" - ] - } - ] -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.json b/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.json index 341d5a61cc..a89a619231 100644 --- a/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.json +++ b/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.json @@ -12,15 +12,15 @@ ], "noImplicitAny": true, "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "typeRoots": [ + "node_modules/@types" + ] }, "compileOnSave": true, "exclude": [ "node_modules/*", "**/*-aot.ts", "aot/**/*" - ], - "angularCompilerOptions": { - "enableIvy": false - } -} \ No newline at end of file + ] +} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js b/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js index 6cfaf379e7..c431e9d8e5 100644 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js +++ b/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js @@ -1,11 +1,11 @@ // #docregion import nodeResolve from 'rollup-plugin-node-resolve' -import commonjs from 'rollup-plugin-commonjs'; -import uglify from 'rollup-plugin-uglify' +import commonjs from 'rollup-plugin-commonjs'; +import uglify from 'rollup-plugin-uglify' //paths are relative to the execution path export default { - input: 'app/main-aot.js', + input: 'app/main.js', output: { file: 'aot/dist/build.js', // output a single application bundle format: 'iife', diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json b/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json index a2b95ecb34..4ff59fe863 100644 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json +++ b/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json @@ -6,20 +6,23 @@ "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "lib": ["es2015", "dom"], + "lib": [ + "es2015", + "dom" + ], "removeComments": false, "noImplicitAny": true, "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "typeRoots": [ + "node_modules/@types" + ] }, - "files": [ "app/app.module.ts", - "app/main-aot.ts" + "app/main.ts" ], - "angularCompilerOptions": { - "skipMetadataEmit" : true, - "enableIvy": false, - } + "skipMetadataEmit": true + } } diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig.json b/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig.json index 6daafd7a89..d1f02feb5b 100644 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig.json +++ b/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig.json @@ -12,14 +12,14 @@ ], "noImplicitAny": true, "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "typeRoots": [ + "node_modules/@types" + ] }, "compileOnSave": true, "exclude": [ "node_modules/*", "**/*-aot.ts" - ], - "angularCompilerOptions": { - "enableIvy": false - } -} \ No newline at end of file + ] +} diff --git a/aio/content/examples/upgrade-phonecat-3-final/tsconfig.json b/aio/content/examples/upgrade-phonecat-3-final/tsconfig.json index 6daafd7a89..d1f02feb5b 100644 --- a/aio/content/examples/upgrade-phonecat-3-final/tsconfig.json +++ b/aio/content/examples/upgrade-phonecat-3-final/tsconfig.json @@ -12,14 +12,14 @@ ], "noImplicitAny": true, "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "typeRoots": [ + "node_modules/@types" + ] }, "compileOnSave": true, "exclude": [ "node_modules/*", "**/*-aot.ts" - ], - "angularCompilerOptions": { - "enableIvy": false - } -} \ No newline at end of file + ] +} diff --git a/aio/package.json b/aio/package.json index 5316812276..9663d40ab0 100644 --- a/aio/package.json +++ b/aio/package.json @@ -66,7 +66,7 @@ "preserve-and-sync": "yarn docs", "serve-and-sync": "run-p \"start\" \"docs-watch --watch-only\"", "boilerplate:add": "node ./tools/examples/example-boilerplate add", - "boilerplate:add:ivy": "yarn boilerplate:add --ivy", + "boilerplate:add:viewengine": "yarn boilerplate:add --viewengine", "boilerplate:remove": "node ./tools/examples/example-boilerplate remove", "boilerplate:test": "node tools/examples/test.js", "generate-stackblitz": "node ./tools/stackblitz-builder/generateStackblitz", diff --git a/aio/tools/example-zipper/customizer/package-json/cli-ajs.json b/aio/tools/example-zipper/customizer/package-json/cli-ajs.json index f19a131a9a..ef9c75606a 100644 --- a/aio/tools/example-zipper/customizer/package-json/cli-ajs.json +++ b/aio/tools/example-zipper/customizer/package-json/cli-ajs.json @@ -1,7 +1,7 @@ { "scripts": [ { "name": "ng", "command": "ng" }, - { "name": "build", "command": "ng build --prod" }, + { "name": "build", "command": "ng build" }, { "name": "start", "command": "ng serve" }, { "name": "test", "command": "ng test" }, { "name": "lint", "command": "ng lint" }, diff --git a/aio/tools/example-zipper/customizer/package-json/cli.json b/aio/tools/example-zipper/customizer/package-json/cli.json index 965bd82407..ebbbbc1341 100644 --- a/aio/tools/example-zipper/customizer/package-json/cli.json +++ b/aio/tools/example-zipper/customizer/package-json/cli.json @@ -1,7 +1,7 @@ { "scripts": [ { "name": "ng", "command": "ng" }, - { "name": "build", "command": "ng build --prod" }, + { "name": "build", "command": "ng build" }, { "name": "start", "command": "ng serve" }, { "name": "test", "command": "ng test" }, { "name": "lint", "command": "ng lint" }, diff --git a/aio/tools/example-zipper/customizer/package-json/getting-started.json b/aio/tools/example-zipper/customizer/package-json/getting-started.json index 965bd82407..ebbbbc1341 100644 --- a/aio/tools/example-zipper/customizer/package-json/getting-started.json +++ b/aio/tools/example-zipper/customizer/package-json/getting-started.json @@ -1,7 +1,7 @@ { "scripts": [ { "name": "ng", "command": "ng" }, - { "name": "build", "command": "ng build --prod" }, + { "name": "build", "command": "ng build" }, { "name": "start", "command": "ng serve" }, { "name": "test", "command": "ng test" }, { "name": "lint", "command": "ng lint" }, diff --git a/aio/tools/example-zipper/customizer/package-json/i18n.json b/aio/tools/example-zipper/customizer/package-json/i18n.json index 57320e769e..f3434be8d1 100644 --- a/aio/tools/example-zipper/customizer/package-json/i18n.json +++ b/aio/tools/example-zipper/customizer/package-json/i18n.json @@ -2,7 +2,7 @@ "scripts": [ { "name": "start", "command": "ng serve" }, { "name": "start:fr", "command": "ng serve --configuration=fr" }, - { "name": "build", "command": "ng build --prod" }, + { "name": "build", "command": "ng build" }, { "name": "build:fr", "command": "ng build --configuration=production-fr" }, { "name": "test", "command": "ng test" }, { "name": "lint", "command": "ng lint" }, diff --git a/aio/tools/example-zipper/customizer/package-json/schematics.json b/aio/tools/example-zipper/customizer/package-json/schematics.json index 44e2cc572e..947a1917c2 100644 --- a/aio/tools/example-zipper/customizer/package-json/schematics.json +++ b/aio/tools/example-zipper/customizer/package-json/schematics.json @@ -1,7 +1,7 @@ { "scripts": [ { "name": "ng", "command": "ng" }, - { "name": "build", "command": "ng build --prod" }, + { "name": "build", "command": "ng build" }, { "name": "build:lib", "command": "ng build my-lib" }, { "name": "start", "command": "ng serve" }, { "name": "test", "command": "ng test" }, diff --git a/aio/tools/examples/README.md b/aio/tools/examples/README.md index 1a0ccfa0be..85a83bdc8a 100644 --- a/aio/tools/examples/README.md +++ b/aio/tools/examples/README.md @@ -32,12 +32,12 @@ Currently you will find the next project types: * cli - For CLI based examples. This is the default one, to be used in the majority of the examples. * getting-started - CLI-based with its own set of styles. * i18n - CLI-based with additional scripts for internationalization. -* ivy - CLI-based with additional configuration for running the examples with the Ivy renderer and ngstc compiler. * schematics - CLI-based with additional scripts for building schematics. * service-worker - CLI-based with additional packages and configuration for service workers. * systemjs - Currently in deprecation, only used in a few examples. * testing - CLI-based with additional styles for jasmine testing. * universal - CLI-based with an extra server target. +* viewengine - Additional configuration for running CLI-/SystemJS-based examples with `ViewEngine` (the pre-Ivy compiler/renderer). There is also a `common` folder that contains files used in all different examples. diff --git a/aio/tools/examples/example-boilerplate.js b/aio/tools/examples/example-boilerplate.js index 13f63d221f..3899f4509b 100644 --- a/aio/tools/examples/example-boilerplate.js +++ b/aio/tools/examples/example-boilerplate.js @@ -50,11 +50,6 @@ BOILERPLATE_PATHS['getting-started'] = [ 'src/styles.css' ]; -BOILERPLATE_PATHS.ivy = { - systemjs: ['rollup-config.js', 'tsconfig-aot.json'], - cli: ['tsconfig.app.json'] -}; - BOILERPLATE_PATHS.schematics = [ ...cliRelativePath, 'angular.json' @@ -65,13 +60,18 @@ BOILERPLATE_PATHS['cli-ajs'] = [ 'package.json' ]; +BOILERPLATE_PATHS.viewengine = { + systemjs: ['rollup-config.js', 'tsconfig-aot.json'], + cli: ['tsconfig.json'] +}; + const EXAMPLE_CONFIG_FILENAME = 'example-config.json'; class ExampleBoilerPlate { /** * Add boilerplate files to all the examples */ - add(ivy = false) { + add(viewengine = false) { // Get all the examples folders, indicated by those that contain a `example-config.json` file const exampleFolders = this.getFoldersContaining(EXAMPLES_BASE_PATH, EXAMPLE_CONFIG_FILENAME, 'node_modules'); @@ -82,7 +82,7 @@ class ExampleBoilerPlate { `Perhaps you need to run "yarn example-use-npm" or "yarn example-use-local" to install the dependencies?`); } - if (ivy) { + if (!viewengine) { shelljs.exec(`yarn --cwd ${SHARED_PATH} ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`); } @@ -107,13 +107,13 @@ class ExampleBoilerPlate { BOILERPLATE_PATHS.common.forEach(filePath => this.copyFile(BOILERPLATE_COMMON_BASE_PATH, exampleFolder, filePath)); } - // Copy Ivy specific files - if (ivy) { - const ivyBoilerPlateType = boilerPlateType === 'systemjs' ? 'systemjs' : 'cli'; - const ivyBoilerPlateBasePath = - path.resolve(BOILERPLATE_BASE_PATH, 'ivy', ivyBoilerPlateType); - BOILERPLATE_PATHS.ivy[ivyBoilerPlateType].forEach( - filePath => this.copyFile(ivyBoilerPlateBasePath, exampleFolder, filePath)); + // Copy ViewEngine (pre-Ivy) specific files + if (viewengine) { + const veBoilerPlateType = boilerPlateType === 'systemjs' ? 'systemjs' : 'cli'; + const veBoilerPlateBasePath = + path.resolve(BOILERPLATE_BASE_PATH, 'viewengine', veBoilerPlateType); + BOILERPLATE_PATHS.viewengine[veBoilerPlateType].forEach( + filePath => this.copyFile(veBoilerPlateBasePath, exampleFolder, filePath)); } }); } @@ -125,7 +125,7 @@ class ExampleBoilerPlate { main() { yargs.usage('$0 [args]') - .command('add', 'add the boilerplate to each example', (yrgs) => this.add(yrgs.argv.ivy)) + .command('add', 'add the boilerplate to each example', yrgs => this.add(yrgs.argv.viewengine)) .command('remove', 'remove the boilerplate from each example', () => this.remove()) .demandCommand(1, 'Please supply a command from the list above') .argv; diff --git a/aio/tools/examples/example-boilerplate.spec.js b/aio/tools/examples/example-boilerplate.spec.js index 85426d0f45..1a4f8fb2ed 100644 --- a/aio/tools/examples/example-boilerplate.spec.js +++ b/aio/tools/examples/example-boilerplate.spec.js @@ -14,18 +14,29 @@ describe('example-boilerplate tool', () => { i18n: 2, universal: 2, systemjs: 7, - common: 1 + common: 1, + viewengine: { + cli: 1, + systemjs: 2, + }, }; const exampleFolders = ['a/b', 'c/d']; beforeEach(() => { spyOn(fs, 'ensureSymlinkSync'); spyOn(fs, 'existsSync').and.returnValue(true); + spyOn(shelljs, 'exec'); spyOn(exampleBoilerPlate, 'copyFile'); spyOn(exampleBoilerPlate, 'getFoldersContaining').and.returnValue(exampleFolders); spyOn(exampleBoilerPlate, 'loadJsonFile').and.returnValue({}); }); + it('should run `ngcc`', () => { + exampleBoilerPlate.add(); + expect(shelljs.exec).toHaveBeenCalledWith( + `yarn --cwd ${sharedDir} ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`); + }); + it('should process all the example folders', () => { const examplesDir = path.resolve(__dirname, '../../content/examples'); exampleBoilerPlate.add(); @@ -50,7 +61,7 @@ describe('example-boilerplate tool', () => { it('should copy all the source boilerplate files for systemjs', () => { const boilerplateDir = path.resolve(sharedDir, 'boilerplate'); - exampleBoilerPlate.loadJsonFile.and.callFake(filePath => filePath.indexOf('a/b') !== -1 ? { projectType: 'systemjs' } : {}) + exampleBoilerPlate.loadJsonFile.and.callFake(filePath => filePath.indexOf('a/b') !== -1 ? { projectType: 'systemjs' } : {}); exampleBoilerPlate.add(); expect(exampleBoilerPlate.copyFile).toHaveBeenCalledTimes( (BPFiles.cli) + @@ -110,6 +121,38 @@ describe('example-boilerplate tool', () => { expect(exampleBoilerPlate.loadJsonFile).toHaveBeenCalledWith(path.resolve('a/b/example-config.json')); expect(exampleBoilerPlate.loadJsonFile).toHaveBeenCalledWith(path.resolve('c/d/example-config.json')); }); + + describe('(viewengine: true)', () => { + it('should not run `ngcc`', () => { + exampleBoilerPlate.add(true); + expect(shelljs.exec).not.toHaveBeenCalled(); + }); + + it('should copy all the source boilerplate files for systemjs', () => { + const boilerplateDir = path.resolve(sharedDir, 'boilerplate'); + exampleBoilerPlate.loadJsonFile.and.callFake(filePath => filePath.indexOf('a/b') !== -1 ? { projectType: 'systemjs' } : {}); + exampleBoilerPlate.add(true); + expect(exampleBoilerPlate.copyFile).toHaveBeenCalledTimes( + (BPFiles.cli + BPFiles.viewengine.cli) + + (BPFiles.systemjs + BPFiles.viewengine.systemjs) + + (BPFiles.common * exampleFolders.length) + ); + // for example + expect(exampleBoilerPlate.copyFile).toHaveBeenCalledWith(`${boilerplateDir}/viewengine/systemjs`, 'a/b', 'tsconfig-aot.json'); + }); + + it('should copy all the source boilerplate files for cli', () => { + const boilerplateDir = path.resolve(sharedDir, 'boilerplate'); + exampleBoilerPlate.add(true); + expect(exampleBoilerPlate.copyFile).toHaveBeenCalledTimes( + (BPFiles.cli * exampleFolders.length) + + (BPFiles.viewengine.cli * exampleFolders.length) + + (BPFiles.common * exampleFolders.length) + ); + // for example + expect(exampleBoilerPlate.copyFile).toHaveBeenCalledWith(`${boilerplateDir}/viewengine/cli`, 'a/b', 'tsconfig.json'); + }); + }); }); describe('remove', () => { diff --git a/aio/tools/examples/run-example-e2e.js b/aio/tools/examples/run-example-e2e.js index ab51992f38..2213a5c454 100644 --- a/aio/tools/examples/run-example-e2e.js +++ b/aio/tools/examples/run-example-e2e.js @@ -28,7 +28,7 @@ const fixmeIvyExamples = [ 'i18n', ]; -if (argv.ivy) { +if (!argv.viewengine) { IGNORED_EXAMPLES.push(...fixmeIvyExamples); } @@ -46,7 +46,7 @@ if (argv.ivy) { * Must be used in conjunction with --setup as this is when the packages are copied. * e.g. --setup --local * - * --ivy to turn on `ivy` mode + * --viewengine to turn on `ViewEngine` mode * * --shard to shard the specs into groups to allow you to run them in parallel * e.g. --shard=0/2 // the even specs: 0, 2, 4, etc @@ -64,7 +64,7 @@ function runE2e() { // Run setup. console.log('runE2e: setup boilerplate'); const installPackagesCommand = `example-use-${argv.local ? 'local' : 'npm'}`; - const addBoilerplateCommand = `boilerplate:add${argv.ivy ? ':ivy' : ''}`; + const addBoilerplateCommand = `boilerplate:add${argv.viewengine ? ':viewengine' : ''}`; shelljs.exec(`yarn ${installPackagesCommand}`, {cwd: AIO_PATH}); shelljs.exec(`yarn ${addBoilerplateCommand}`, {cwd: AIO_PATH}); } @@ -185,7 +185,7 @@ function runE2eTestsSystemJS(appDir, outputFile) { // Only run AOT tests in ViewEngine mode. The current AOT setup does not work in Ivy. // See https://github.com/angular/angular/issues/35989. - if (!argv.ivy && fs.existsSync(appDir + '/aot/index.html')) { + if (argv.viewengine && fs.existsSync(appDir + '/aot/index.html')) { run = run.then((ok) => ok && runProtractorAoT(appDir, outputFile)); } return run; @@ -311,7 +311,7 @@ function reportStatus(status, outputFile) { IGNORED_EXAMPLES.filter(example => !fixmeIvyExamples.find(ex => ex.startsWith(example))) .forEach(function(val) { log.push(' ' + val); }); - if (argv.ivy) { + if (!argv.viewengine) { log.push(''); log.push('Suites ignored due to breakage with Ivy:'); fixmeIvyExamples.forEach(function(val) { log.push(' ' + val); }); diff --git a/aio/tools/examples/shared/boilerplate/cli/tsconfig.json b/aio/tools/examples/shared/boilerplate/cli/tsconfig.json index e4816a58e7..30956ae7ea 100644 --- a/aio/tools/examples/shared/boilerplate/cli/tsconfig.json +++ b/aio/tools/examples/shared/boilerplate/cli/tsconfig.json @@ -20,7 +20,6 @@ ] }, "angularCompilerOptions": { - "enableIvy": false, "fullTemplateTypeCheck": true, "strictInjectionParameters": true } diff --git a/aio/tools/examples/shared/boilerplate/ivy/cli/tsconfig.app.json b/aio/tools/examples/shared/boilerplate/ivy/cli/tsconfig.app.json deleted file mode 100644 index 5360c33dd7..0000000000 --- a/aio/tools/examples/shared/boilerplate/ivy/cli/tsconfig.app.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [] - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ], - "exclude": [ - "src/test.ts", - "src/**/*.spec.ts", - "src/**/*-specs.ts", - "src/**/*.avoid.ts", - "src/**/*.0.ts", - "src/**/*.1.ts", - "src/**/*.1b.ts", - "src/**/*.2.ts", - "src/**/*.3.ts", - "src/**/*.4.ts", - "src/**/*.5.ts", - "src/**/*.6.ts", - "src/**/*.7.ts", - "src/**/testing" - ], - "angularCompilerOptions": { - "enableIvy": true - } -} diff --git a/aio/tools/examples/shared/boilerplate/viewengine/cli/tsconfig.json b/aio/tools/examples/shared/boilerplate/viewengine/cli/tsconfig.json new file mode 100644 index 0000000000..e4816a58e7 --- /dev/null +++ b/aio/tools/examples/shared/boilerplate/viewengine/cli/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "module": "esnext", + "moduleResolution": "node", + "importHelpers": true, + "target": "es2015", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2018", + "dom" + ] + }, + "angularCompilerOptions": { + "enableIvy": false, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true + } +} diff --git a/aio/tools/examples/shared/boilerplate/ivy/systemjs/rollup-config.js b/aio/tools/examples/shared/boilerplate/viewengine/systemjs/rollup-config.js similarity index 86% rename from aio/tools/examples/shared/boilerplate/ivy/systemjs/rollup-config.js rename to aio/tools/examples/shared/boilerplate/viewengine/systemjs/rollup-config.js index ec1bbb5908..752e637e50 100644 --- a/aio/tools/examples/shared/boilerplate/ivy/systemjs/rollup-config.js +++ b/aio/tools/examples/shared/boilerplate/viewengine/systemjs/rollup-config.js @@ -5,7 +5,7 @@ import uglify from 'rollup-plugin-uglify' //paths are relative to the execution path export default { - input: 'app/main.js', + input: 'app/main-aot.js', output: { file: 'aot/dist/build.js', // output a single application bundle format: 'iife', @@ -13,7 +13,7 @@ export default { sourcemapFile: 'aot/dist/build.js.map' }, plugins: [ - nodeResolve({ jsnext: true, module: true }), + nodeResolve({jsnext: true, module: true}), commonjs({ include: ['node_modules/rxjs/**'] }), diff --git a/aio/tools/examples/shared/boilerplate/ivy/systemjs/tsconfig-aot.json b/aio/tools/examples/shared/boilerplate/viewengine/systemjs/tsconfig-aot.json similarity index 81% rename from aio/tools/examples/shared/boilerplate/ivy/systemjs/tsconfig-aot.json rename to aio/tools/examples/shared/boilerplate/viewengine/systemjs/tsconfig-aot.json index d68fa9f6ec..0686676970 100644 --- a/aio/tools/examples/shared/boilerplate/ivy/systemjs/tsconfig-aot.json +++ b/aio/tools/examples/shared/boilerplate/viewengine/systemjs/tsconfig-aot.json @@ -7,24 +7,23 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ - "es2018", + "es2015", "dom" ], "removeComments": false, "noImplicitAny": true, "skipLibCheck": true, "suppressImplicitAnyIndexErrors": true, - "importHelpers": true, "typeRoots": [ "node_modules/@types" ] }, "files": [ "app/app.module.ts", - "app/main.ts" + "app/main-aot.ts" ], "angularCompilerOptions": { - "skipMetadataEmit": true, - "enableIvy": true + "enableIvy": false, + "skipMetadataEmit": true } }