This contains major changes to the compiler, bootstrap of the platforms and test environment initialization. Main part of #10043 Closes #10164 BREAKING CHANGE: - Semantics and name of `@AppModule` (now `@NgModule`) changed quite a bit. This is actually not breaking as `@AppModules` were not part of rc.4. We will have detailed docs on `@NgModule` separately. - `coreLoadAndBootstrap` and `coreBootstrap` can't be used any more (without migration support). Use `bootstrapModule` / `bootstrapModuleFactory` instead. - All Components listed in routes have to be part of the `declarations` of an NgModule. Either directly on the bootstrap module / lazy loaded module, or in an NgModule imported by them.
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
set -ex -o pipefail
 | 
						|
 | 
						|
# These ones can be `npm link`ed for fast development
 | 
						|
LINKABLE_PKGS=(
 | 
						|
  $(pwd)/dist/packages-dist/{common,forms,core,compiler,compiler-cli,platform-{browser,server},platform-browser-dynamic}
 | 
						|
  $(pwd)/dist/tools/@angular/tsc-wrapped
 | 
						|
)
 | 
						|
PKGS=(
 | 
						|
  reflect-metadata
 | 
						|
  typescript@next
 | 
						|
  zone.js
 | 
						|
  rxjs
 | 
						|
  @types/{node,jasmine}
 | 
						|
  jasmine
 | 
						|
)
 | 
						|
 | 
						|
TMPDIR=${TMPDIR:-.}
 | 
						|
readonly TMP=$TMPDIR/e2e_test.$(date +%s)
 | 
						|
mkdir -p $TMP
 | 
						|
cp -R -v modules/@angular/compiler-cli/integrationtest/* $TMP
 | 
						|
# 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
 | 
						|
  set -ex -o pipefail
 | 
						|
  npm install ${PKGS[*]}
 | 
						|
  # TODO(alexeagle): allow this to be npm link instead
 | 
						|
  npm install ${LINKABLE_PKGS[*]}
 | 
						|
 | 
						|
  ./node_modules/.bin/tsc --version
 | 
						|
  # Compile the compiler-cli integration tests
 | 
						|
  ./node_modules/.bin/ngc
 | 
						|
  ./node_modules/.bin/ng-xi18n
 | 
						|
 | 
						|
  ./node_modules/.bin/jasmine init
 | 
						|
  # Run compiler-cli integration tests in node
 | 
						|
  ./node_modules/.bin/jasmine test/*_spec.js
 | 
						|
 | 
						|
  # Compile again with a differently named tsconfig file
 | 
						|
  mv tsconfig.json othername.json
 | 
						|
  ./node_modules/.bin/ngc -p othername.json
 | 
						|
)
 |