1- /***********************************************************************************************
2- * User Configuration.
3- **********************************************************************************************/
4-
5- const angularDeps = [
6- // Angular specific barrels.
7- '@angular/core' ,
8- '@angular/common' ,
9- '@angular/compiler' ,
10- '@angular/http' ,
11- '@angular/forms' ,
12- '@angular/router' ,
13- '@angular/platform-browser' ,
14- '@angular/platform-browser-dynamic' ,
15- ] ;
16-
17- const barrels : string [ ] = [
18- // Thirdparty barrels.
19- 'rxjs' ,
20-
21- // App specific barrels.
22- 'demo-app' ,
23- 'button-toggle' ,
24- 'gestures' ,
25- 'live-announcer' ,
26- 'portal' ,
27- 'overlay' ,
28- ] ;
29-
30-
31- const angularPackages : any = angularDeps . reduce ( ( config : any , pkg : string ) => {
32- const name = pkg . replace ( '@angular/' , '' ) ;
33- const main = `bundles/${ name } .umd.js` ;
34- const testMain = `../bundles/${ name } -testing.umd.js` ;
35-
36- config [ pkg ] = { main } ;
37- config [ `${ pkg } /testing` ] = { main : testMain } ;
38- return config ;
39- } , { } ) ;
40- barrels . forEach ( ( barrelName : string ) => {
41- angularPackages [ barrelName ] = { main : 'index' } ;
42- } ) ;
43-
44- const angularMaps : any = angularDeps . reduce ( ( config : any , pkg : string ) => {
45- config [ pkg ] = `vendor/${ pkg } ` ;
46- return config ;
47- } , { } ) ;
48-
491/** Type declaration for ambient System. */
502declare var System : any ;
513
524// Apply the CLI SystemJS configuration.
535System . config ( {
54- map : Object . assign ( {
6+ map : {
557 'rxjs' : 'vendor/rxjs' ,
568 'main' : 'main.js' ,
57- } , angularMaps ) ,
58- packages : Object . assign ( {
9+
10+ // Angular specific mappings.
11+ '@angular/core' : 'vendor/@angular/core/bundles/core.umd.js' ,
12+ '@angular/core/testing' : 'vendor/@angular/core/bundles/core-testing.umd.js' ,
13+ '@angular/common' : 'vendor/@angular/common/bundles/common.umd.js' ,
14+ '@angular/common/testing' : 'vendor/@angular/common/bundles/common-testing.umd.js' ,
15+ '@angular/compiler' : 'vendor/@angular/compiler/bundles/compiler.umd.js' ,
16+ '@angular/compiler/testing' : 'vendor/@angular/compiler/bundles/compiler-testing.umd.js' ,
17+ '@angular/http' : 'vendor/@angular/http/bundles/http.umd.js' ,
18+ '@angular/http/testing' : 'vendor/@angular/http/bundles/http-testing.umd.js' ,
19+ '@angular/forms' : 'vendor/@angular/forms/bundles/forms.umd.js' ,
20+ '@angular/forms/testing' : 'vendor/@angular/forms/bundles/forms-testing.umd.js' ,
21+ '@angular/router' : 'vendor/@angular/router/bundles/router.umd.js' ,
22+ '@angular/router/testing' : 'vendor/@angular/router/bundles/router-testing.umd.js' ,
23+ '@angular/platform-browser' : 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js' ,
24+ '@angular/platform-browser/testing' :
25+ 'vendor/@angular/platform-browser/bundles/platform-browser-testing.umd.js' ,
26+ '@angular/platform-browser-dynamic' :
27+ 'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js' ,
28+ '@angular/platform-browser-dynamic/testing' :
29+ 'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js' ,
30+ } ,
31+ packages : {
32+ // Thirdparty barrels.
33+ 'rxjs' : { main : 'index' } ,
5934 '@angular/material' : {
6035 format : 'cjs' ,
6136 main : 'material.umd.js'
@@ -65,5 +40,5 @@ System.config({
6540 '.' : {
6641 defaultExtension : 'js'
6742 }
68- } , angularPackages )
43+ }
6944} ) ;
0 commit comments