| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							| 
									
										
										
										
											2017-03-05 01:49:10 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | set -u -e -o pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-05 11:36:08 -08:00
										 |  |  | # npm 5 symlinks from local file installations rather than copying files, but | 
					
						
							|  |  |  | # webpack will not follow the symlinks. | 
					
						
							|  |  |  | # We prefer to emulate how a user will install angular, so we `npm pack` the | 
					
						
							|  |  |  | # packages, then install them from the resulting .tgz files later. | 
					
						
							|  |  |  | ANGULAR_PKGS=$(npm pack dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic,router,http,animations} | awk "{ printf \"$PWD/\"; print }") | 
					
						
							| 
									
										
										
										
											2017-01-24 09:00:29 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-08 08:59:25 -08:00
										 |  |  | TYPESCRIPT_VERSION=typescript@2.7.2 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | PKGS=( | 
					
						
							| 
									
										
										
										
											2016-09-02 15:42:22 -07:00
										 |  |  |   reflect-metadata@0.1.8 | 
					
						
							| 
									
										
										
										
											2017-09-08 18:40:32 -07:00
										 |  |  |   zone.js@0.8.7 | 
					
						
							|  |  |  |   rxjs@5.4.2 | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2017-03-15 15:50:30 -07:00
										 |  |  |   source-map-loader@0.2.0 | 
					
						
							| 
									
										
										
										
											2017-08-31 10:56:26 +02:00
										 |  |  |   @angular/{material,cdk}@2.0.0-beta.10 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | TMPDIR=${TMPDIR:-.} | 
					
						
							|  |  |  | readonly TMP=$TMPDIR/e2e_test.$(date +%s) | 
					
						
							|  |  |  | mkdir -p $TMP | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  | cp -R -v packages/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 | 
					
						
							| 
									
										
										
										
											2018-02-08 08:59:25 -08:00
										 |  |  |   npm install ${PKGS[*]} $TYPESCRIPT_VERSION | 
					
						
							| 
									
										
										
										
											2017-12-05 11:36:08 -08:00
										 |  |  |   npm install ${ANGULAR_PKGS[*]} | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2017-09-20 09:54:47 -07:00
										 |  |  |   ./node_modules/.bin/ngc -p third_party_src/tsconfig-build.json | 
					
						
							| 
									
										
										
										
											2016-10-24 13:28:23 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-20 16:31:11 -07:00
										 |  |  |   # Generate the the bundle modules | 
					
						
							| 
									
										
										
										
											2017-09-20 09:54:47 -07:00
										 |  |  |   ./node_modules/.bin/ngc -p flat_module/tsconfig-build.json | 
					
						
							| 
									
										
										
										
											2017-03-20 16:31:11 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   # Copy the html files from source to the emitted output | 
					
						
							|  |  |  |   cp flat_module/src/*.html node_modules/flat_module/src | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-24 13:28:23 -07:00
										 |  |  |   ./node_modules/.bin/ngc -p tsconfig-build.json --i18nFile=src/messages.fi.xlf --locale=fi --i18nFormat=xlf | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-16 17:03:18 +01:00
										 |  |  |   ./node_modules/.bin/ng-xi18n -p tsconfig-xi18n.json --i18nFormat=xlf --locale=fr | 
					
						
							| 
									
										
										
										
											2017-04-14 09:05:00 -07:00
										 |  |  |   ./node_modules/.bin/ng-xi18n -p tsconfig-xi18n.json --i18nFormat=xlf2 --outFile=messages.xliff2.xlf | 
					
						
							| 
									
										
										
										
											2017-02-15 18:50:03 +01:00
										 |  |  |   ./node_modules/.bin/ng-xi18n -p tsconfig-xi18n.json --i18nFormat=xmb --outFile=custom_file.xmb | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | ) |