| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | set -ex -o pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # These ones can be `npm link`ed for fast development | 
					
						
							|  |  |  | LINKABLE_PKGS=( | 
					
						
							| 
									
										
										
										
											2016-12-13 17:35:06 -08:00
										 |  |  |   $(pwd)/dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic,router} | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   $(pwd)/dist/tools/@angular/tsc-wrapped | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2017-01-05 11:34:42 -08:00
										 |  |  | TYPESCRIPT_2_0=typescript@2.0.2 | 
					
						
							|  |  |  | TYPESCRIPT_2_1=typescript@2.1.4 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | PKGS=( | 
					
						
							| 
									
										
										
										
											2016-09-02 15:42:22 -07:00
										 |  |  |   reflect-metadata@0.1.8 | 
					
						
							| 
									
										
										
										
											2016-10-24 13:28:23 -07:00
										 |  |  |   zone.js@0.6.25 | 
					
						
							| 
									
										
										
										
											2016-12-18 17:24:50 -07:00
										 |  |  |   rxjs@5.0.1 | 
					
						
							| 
									
										
										
										
											2016-09-02 15:42:22 -07:00
										 |  |  |   @types/{node@6.0.38,jasmine@2.2.33} | 
					
						
							|  |  |  |   jasmine@2.4.1 | 
					
						
							| 
									
										
										
										
											2016-08-30 18:07:40 -07:00
										 |  |  |   webpack@2.1.0-beta.21 | 
					
						
							| 
									
										
										
										
											2016-09-02 15:42:22 -07:00
										 |  |  |   @angular2-material/{core,button}@2.0.0-alpha.8-1 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | TMPDIR=${TMPDIR:-.} | 
					
						
							|  |  |  | readonly TMP=$TMPDIR/e2e_test.$(date +%s) | 
					
						
							|  |  |  | mkdir -p $TMP | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  | cp -R -v modules/@angular/compiler-cli/integrationtest/* $TMP | 
					
						
							| 
									
										
										
										
											2016-10-06 08:37:37 -07:00
										 |  |  | cp -R -v modules/benchmarks $TMP | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | # Try to use the same versions as angular, in particular, this will | 
					
						
							|  |  |  | # cause us to install the same rxjs version. | 
					
						
							|  |  |  | cp -v package.json $TMP | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # run in subshell to avoid polluting cwd | 
					
						
							|  |  |  | ( | 
					
						
							|  |  |  |   cd $TMP | 
					
						
							| 
									
										
										
										
											2016-06-14 19:04:24 -07:00
										 |  |  |   set -ex -o pipefail | 
					
						
							| 
									
										
										
										
											2017-01-05 11:34:42 -08:00
										 |  |  |   npm install ${PKGS[*]} $TYPESCRIPT_2_0 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   # TODO(alexeagle): allow this to be npm link instead | 
					
						
							|  |  |  |   npm install ${LINKABLE_PKGS[*]} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-23 14:26:54 -07:00
										 |  |  |   ./node_modules/.bin/tsc --version | 
					
						
							| 
									
										
										
										
											2016-10-24 13:28:23 -07:00
										 |  |  |   # Compile the compiler-cli third_party simulation. | 
					
						
							|  |  |  |   # Use ngc-wrapped directly so we don't produce *.ngfactory.ts files! | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  |   # Compile the compiler-cli integration tests | 
					
						
							| 
									
										
										
										
											2016-08-12 22:13:54 -07:00
										 |  |  |   # TODO(vicb): restore the test for .xtb | 
					
						
							| 
									
										
										
										
											2016-10-24 13:28:23 -07:00
										 |  |  |   #./node_modules/.bin/ngc -p tsconfig-build.json --i18nFile=src/messages.fi.xtb --locale=fi --i18nFormat=xtb | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   # Generate the metadata for the third-party modules | 
					
						
							|  |  |  |   node ./node_modules/@angular/tsc-wrapped/src/main -p third_party_src/tsconfig-build.json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   ./node_modules/.bin/ngc -p tsconfig-build.json --i18nFile=src/messages.fi.xlf --locale=fi --i18nFormat=xlf | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   ./node_modules/.bin/ng-xi18n -p tsconfig-build.json --i18nFormat=xlf | 
					
						
							|  |  |  |   ./node_modules/.bin/ng-xi18n -p tsconfig-build.json --i18nFormat=xmb | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-29 15:36:33 -08:00
										 |  |  |   node test/test_summaries.js | 
					
						
							| 
									
										
										
										
											2016-12-13 17:35:06 -08:00
										 |  |  |   node test/test_ngtools_api.js | 
					
						
							| 
									
										
										
										
											2016-11-29 15:36:33 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   ./node_modules/.bin/jasmine init | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  |   # Run compiler-cli integration tests in node | 
					
						
							| 
									
										
										
										
											2016-08-30 18:07:40 -07:00
										 |  |  |   ./node_modules/.bin/webpack ./webpack.config.js | 
					
						
							|  |  |  |   ./node_modules/.bin/jasmine ./all_spec.js | 
					
						
							| 
									
										
										
										
											2016-06-23 14:26:54 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   # Compile again with a differently named tsconfig file | 
					
						
							| 
									
										
										
										
											2016-10-24 13:28:23 -07:00
										 |  |  |   mv tsconfig-build.json othername.json | 
					
						
							| 
									
										
										
										
											2016-06-23 14:26:54 -07:00
										 |  |  |   ./node_modules/.bin/ngc -p othername.json | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2017-01-05 11:34:42 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Repeat selected parts of the above with TypeScript 2.1 | 
					
						
							|  |  |  | readonly TMP_2_1=$TMPDIR/e2e_test.$(date +%s) | 
					
						
							|  |  |  | mkdir -p $TMP_2_1 | 
					
						
							|  |  |  | cp -R -v modules/@angular/compiler-cli/integrationtest/* $TMP_2_1 | 
					
						
							|  |  |  | cp -R -v modules/benchmarks $TMP_2_1 | 
					
						
							|  |  |  | cp -v package.json $TMP_2_1 | 
					
						
							|  |  |  | ( | 
					
						
							|  |  |  |   cd $TMP_2_1 | 
					
						
							|  |  |  |   set -ex -o pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   npm install ${PKGS[*]} $TYPESCRIPT_2_1 | 
					
						
							|  |  |  |   npm install ${LINKABLE_PKGS[*]} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   ./node_modules/.bin/tsc --version | 
					
						
							|  |  |  |   node ./node_modules/@angular/tsc-wrapped/src/main -p third_party_src/tsconfig-build.json | 
					
						
							|  |  |  |   ./node_modules/.bin/ngc -p tsconfig-build.json --i18nFile=src/messages.fi.xlf --locale=fi --i18nFormat=xlf | 
					
						
							|  |  |  | ) |