mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: stop building rxjs for closure compiler test (#6635)
For every Pull Request, a job that runs the Google Closure Compiler against the demo-app will be started. In the past Closure Compiler wasn't able to properly handle CommonJS packages from the node modules. Now the Google Closure Compiler will be reconfigured to properly handle CommonJS packages (meaning that RxJS no longer needs to be built manually)
This commit is contained in:
committed by
Jeremy Elbourn
parent
6df814468c
commit
2ef6382bae
@@ -8,7 +8,6 @@ set -e -o pipefail
|
||||
# Go to the project root directory
|
||||
cd $(dirname $0)/../..
|
||||
|
||||
|
||||
# Build a release of material and of the CDK package.
|
||||
$(npm bin)/gulp material:build-release:clean
|
||||
$(npm bin)/gulp cdk:build-release
|
||||
@@ -17,21 +16,12 @@ $(npm bin)/gulp cdk:build-release
|
||||
$(npm bin)/gulp :build:devapp:assets :build:devapp:scss
|
||||
$(npm bin)/tsc -p src/demo-app/tsconfig-build.json --target ES2015 --module ES2015
|
||||
|
||||
# Re-compile RxJS sources into ES2015. Otherwise closure compiler can't parse it properly.
|
||||
$(npm bin)/ngc -p scripts/closure-compiler/tsconfig-rxjs.json
|
||||
|
||||
# Create a list of all RxJS source files.
|
||||
rxjsSourceFiles=$(find dist/packages/rxjs -name '*.js');
|
||||
rxjsSourceFiles=$(find node_modules/rxjs/ -name '*.js');
|
||||
|
||||
# List of entry points in the CDK package. Exclude "testing" since it's not an entry point.
|
||||
cdkEntryPoints=($(find src/cdk -maxdepth 1 -mindepth 1 -type d -not -name testing -exec basename {} \;))
|
||||
|
||||
# Due a Closure Compiler issue https://github.com/google/closure-compiler/issues/2247
|
||||
# we need to add exports to the different RxJS ES2015 files.
|
||||
for i in $rxjsSourceFiles; do
|
||||
echo "export var __CLOSURE_WORKAROUND__" >> $i
|
||||
done
|
||||
|
||||
OPTS=(
|
||||
"--language_in=ES6_STRICT"
|
||||
"--language_out=ES5"
|
||||
@@ -41,6 +31,8 @@ OPTS=(
|
||||
"--property_renaming_report=dist/closure/property_renaming_report"
|
||||
"--warning_level=QUIET"
|
||||
"--rewrite_polyfills=false"
|
||||
"--module_resolution=node"
|
||||
"--process_common_js_modules"
|
||||
|
||||
# List of path prefixes to be removed from ES6 & CommonJS modules.
|
||||
"--js_module_root=dist/packages"
|
||||
@@ -103,4 +95,4 @@ echo ${OPTS[*]} > $closureFlags
|
||||
# Run the Google Closure compiler java runnable.
|
||||
java -jar node_modules/google-closure-compiler/compiler.jar --flagfile $closureFlags
|
||||
|
||||
echo "Finished bundling the dev-app using google closure compiler.."
|
||||
echo "Finished bundling the dev-app using Google Closure Compiler."
|
||||
|
||||
Reference in New Issue
Block a user