build(tsc): Use angular2-template-compiler in place of tsc

This lets us down-level Decorators with tsickle and produce .metadata.json
files for users to reference when offline-compiling their app.
This commit is contained in:
Alex Eagle 2016-05-01 18:48:38 -07:00 committed by Tobias Bosch
parent ce5b37239e
commit 3ae856ab8b
23 changed files with 93 additions and 10 deletions

View File

@ -6,9 +6,9 @@ cd `dirname $0`
TSCONFIG=./modules/tsconfig.json TSCONFIG=./modules/tsconfig.json
echo "====== (all)COMPILING: \$(npm bin)/tsc -p ${TSCONFIG} =====" echo "====== (all)COMPILING: \$(npm bin)/ng2tc -p ${TSCONFIG} ====="
rm -rf ./dist/all/ rm -rf ./dist/all/
$(npm bin)/tsc -p ${TSCONFIG} $(npm bin)/ng2tc -p ${TSCONFIG}
rm -rf ./dist/packages-dist rm -rf ./dist/packages-dist
@ -30,8 +30,8 @@ do
UMDES5PATH=${DESTDIR}/${PACKAGE}.umd.js UMDES5PATH=${DESTDIR}/${PACKAGE}.umd.js
echo "====== COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json =====" echo "====== COMPILING: \$(npm bin)/ng2tc -p ${SRCDIR}/tsconfig.json ====="
$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json $(npm bin)/ng2tc -p ${SRCDIR}/tsconfig.json
cp ${SRCDIR}/package.json ${DESTDIR}/ cp ${SRCDIR}/package.json ${DESTDIR}/
@ -44,8 +44,8 @@ do
fi fi
echo "====== (esm)COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json =====" echo "====== (esm)COMPILING: \$(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es2015.json ====="
$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json $(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es2015.json
echo "====== BUNDLING: ${SRCDIR} =====" echo "====== BUNDLING: ${SRCDIR} ====="

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -1,4 +1,7 @@
{ {
"angularCompilerOptions": {
"skipTemplateCodegen": true
},
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"declaration": true, "declaration": true,

View File

@ -54,6 +54,13 @@
"angular-mocks": { "angular-mocks": {
"version": "1.5.0" "version": "1.5.0"
}, },
"angular2": {
"version": "2.0.0-beta.17",
"resolved": "git://github.com/angular/angular.git#08cbd5481d04255864f5ff8e33d0756d4ec4c440"
},
"angular2-template-compiler": {
"version": "0.1.5"
},
"ansi": { "ansi": {
"version": "0.3.0" "version": "0.3.0"
}, },
@ -5361,6 +5368,9 @@
} }
} }
}, },
"ts-metadata-collector": {
"version": "0.1.1"
},
"ts2dart": { "ts2dart": {
"version": "0.9.10", "version": "0.9.10",
"dependencies": { "dependencies": {
@ -5434,7 +5444,7 @@
} }
}, },
"tsickle": { "tsickle": {
"version": "0.1.0", "version": "0.1.1",
"dependencies": { "dependencies": {
"source-map": { "source-map": {
"version": "0.4.4" "version": "0.4.4"

21
npm-shrinkwrap.json generated
View File

@ -88,6 +88,16 @@
"from": "angular-mocks@1.5.0", "from": "angular-mocks@1.5.0",
"resolved": "https://registry.npmjs.org/angular-mocks/-/angular-mocks-1.5.0.tgz" "resolved": "https://registry.npmjs.org/angular-mocks/-/angular-mocks-1.5.0.tgz"
}, },
"angular2": {
"version": "2.0.0-beta.17",
"from": "angular/angular#2.0.0-build.cacdead.js",
"resolved": "git://github.com/angular/angular.git#08cbd5481d04255864f5ff8e33d0756d4ec4c440"
},
"angular2-template-compiler": {
"version": "0.1.5",
"from": "angular2-template-compiler@>=0.1.5 <0.2.0",
"resolved": "https://registry.npmjs.org/angular2-template-compiler/-/angular2-template-compiler-0.1.5.tgz"
},
"ansi": { "ansi": {
"version": "0.3.0", "version": "0.3.0",
"from": "ansi@>=0.3.0 <0.4.0", "from": "ansi@>=0.3.0 <0.4.0",
@ -8549,6 +8559,11 @@
} }
} }
}, },
"ts-metadata-collector": {
"version": "0.1.1",
"from": "ts-metadata-collector@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/ts-metadata-collector/-/ts-metadata-collector-0.1.1.tgz"
},
"ts2dart": { "ts2dart": {
"version": "0.9.10", "version": "0.9.10",
"from": "ts2dart@>=0.9.9 <0.10.0", "from": "ts2dart@>=0.9.9 <0.10.0",
@ -8666,9 +8681,9 @@
} }
}, },
"tsickle": { "tsickle": {
"version": "0.1.0", "version": "0.1.1",
"from": "tsickle@latest", "from": "tsickle@0.1.1",
"resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.1.0.tgz", "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.1.1.tgz",
"dependencies": { "dependencies": {
"source-map": { "source-map": {
"version": "0.4.4", "version": "0.4.4",

View File

@ -28,6 +28,7 @@
"angular": "^1.5.0", "angular": "^1.5.0",
"angular-animate": "^1.5.0", "angular-animate": "^1.5.0",
"angular-mocks": "^1.5.0", "angular-mocks": "^1.5.0",
"angular2-template-compiler": "^0.1.5",
"base64-js": "^0.0.8", "base64-js": "^0.0.8",
"bower": "^1.3.12", "bower": "^1.3.12",
"broccoli": "^0.16.9", "broccoli": "^0.16.9",