Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(compiler-cli): use the transformer based compiler by default
The source map does not currently work with the transformer pipeline. It will be re-enabled after TypeScript 2.4 is made the min version. To revert to the former compiler, use the `disableTransformerPipeline` in tsconfig.json: ``` { "angularCompilerOptions": { "disableTransformerPipeline": true } } ```
- Loading branch information
Showing
31 changed files
with
568 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--compilation_level=ADVANCED_OPTIMIZATIONS | ||
--language_out=ES5 | ||
--js_output_file=dist/bundle.js | ||
--output_manifest=dist/manifest.MF | ||
--variable_renaming_report=dist/variable_renaming_report | ||
--property_renaming_report=dist/property_renaming_report | ||
--create_source_map=%outname%.map | ||
|
||
--warning_level=QUIET | ||
--dependency_mode=STRICT | ||
--rewrite_polyfills=false | ||
|
||
node_modules/zone.js/dist/zone_externs.js | ||
|
||
--js node_modules/rxjs/**.js | ||
--process_common_js_modules | ||
--module_resolution=node | ||
|
||
node_modules/@angular/core/@angular/core.js | ||
--js_module_root=node_modules/@angular/core | ||
node_modules/@angular/core/src/testability/testability.externs.js | ||
|
||
node_modules/@angular/common/@angular/common.js | ||
--js_module_root=node_modules/@angular/common | ||
|
||
node_modules/@angular/platform-browser/@angular/platform-browser.js | ||
--js_module_root=node_modules/@angular/platform-browser | ||
|
||
--js built/**.js | ||
--entry_point=built/src/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { browser, element, by } from 'protractor'; | ||
|
||
describe('i18n E2E Tests', function () { | ||
it('remove i18n attributes', function () { | ||
browser.get(''); | ||
const div = element(by.css('div')); | ||
expect(div.getAttribute('title')).not.toBe(null); | ||
expect(div.getAttribute('i18n')).toBe(null); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"open": false, | ||
"logLevel": "silent", | ||
"port": 8080, | ||
"server": { | ||
"baseDir": "src", | ||
"routes": { | ||
"/dist": "dist", | ||
"/node_modules": "node_modules" | ||
}, | ||
"middleware": { | ||
"0": null | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
exports.config = { | ||
specs: [ | ||
'../built/e2e/*.e2e-spec.js' | ||
], | ||
capabilities: { | ||
browserName: 'chrome', | ||
chromeOptions: { | ||
args: ['--no-sandbox'], | ||
binary: process.env.CHROME_BIN, | ||
} | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:8080/', | ||
framework: 'jasmine', | ||
useAllAngular2AppRoots: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "../built/e2e", | ||
"types": ["jasmine"], | ||
// TODO(alexeagle): was required for Protractor 4.0.11 | ||
"skipLibCheck": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "angular-integration", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@angular/animations": "file:../../dist/packages-dist/animations", | ||
"@angular/common": "file:../../dist/packages-dist/common", | ||
"@angular/compiler": "file:../../dist/packages-dist/compiler", | ||
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", | ||
"@angular/core": "file:../../dist/packages-dist/core", | ||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", | ||
"@angular/platform-server": "file:../../dist/packages-dist/platform-server", | ||
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped", | ||
"google-closure-compiler": "20170409.0.0", | ||
"rxjs": "5.3.1", | ||
"typescript": "~2.3.1", | ||
"zone.js": "0.8.6" | ||
}, | ||
"devDependencies": { | ||
"@types/jasmine": "2.5.41", | ||
"concurrently": "3.4.0", | ||
"lite-server": "2.2.2", | ||
"protractor": "file:../../node_modules/protractor" | ||
}, | ||
"scripts": { | ||
"closure": "java -jar node_modules/google-closure-compiler/compiler.jar --flagfile closure.conf", | ||
"test": "ngc && yarn run closure && concurrently \"yarn run serve\" \"yarn run protractor\" --kill-others --success first", | ||
"serve": "lite-server -c e2e/browser.config.json", | ||
"preprotractor": "tsc -p e2e", | ||
"protractor": "protractor e2e/protractor.config.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {HelloWorldComponent} from './hello-world.component'; | ||
|
||
import {NgModule} from '@angular/core'; | ||
import {BrowserModule} from '@angular/platform-browser'; | ||
|
||
@NgModule({ | ||
declarations: [HelloWorldComponent], | ||
bootstrap: [HelloWorldComponent], | ||
imports: [BrowserModule], | ||
}) | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'hello-world-app', | ||
template: `<div i18n="desc|meaning" title="i18n attribute should be removed">Hello {{ name }}!</div>`, | ||
}) | ||
export class HelloWorldComponent { | ||
name: string = 'world'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Hello World</title> | ||
<base href="/"> | ||
</head> | ||
|
||
<body> | ||
<hello-world-app>Loading...</hello-world-app> | ||
|
||
<script src="node_modules/zone.js/dist/zone.min.js"></script> | ||
<script src="dist/bundle.js"></script> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import {platformBrowser} from '@angular/platform-browser'; | ||
import {AppModuleNgFactory} from './app.ngfactory'; | ||
|
||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"angularCompilerOptions": { | ||
"annotationsAs": "static fields", | ||
"annotateForClosureCompiler": true, | ||
"alwaysCompileGeneratedCode": true | ||
}, | ||
|
||
"compilerOptions": { | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
// TODO(i): strictNullChecks should turned on but are temporarily disabled due to #15432 | ||
"strictNullChecks": false, | ||
"target": "es6", | ||
"noImplicitAny": false, | ||
"sourceMap": false, | ||
"experimentalDecorators": true, | ||
"outDir": "built", | ||
"rootDir": ".", | ||
"declaration": true, | ||
"types": [] | ||
}, | ||
|
||
"exclude": [ | ||
"vendor", | ||
"node_modules", | ||
"built", | ||
"dist", | ||
"e2e" | ||
] | ||
} |
12 changes: 0 additions & 12 deletions
12
packages/compiler-cli/integrationtest/alt/src/bootstrap.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
packages/compiler-cli/integrationtest/tsconfig-build-alt.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.