Created
May 30, 2016 09:37
-
-
Save cjblomqvist/acc7ba0512040230595681c5f2a93036 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************************************** | |
* User Configuration. | |
**********************************************************************************************/ | |
/** Map relative paths to URLs. */ | |
const map: any = { | |
}; | |
/** User packages configuration. */ | |
const packages: any = { | |
}; | |
//////////////////////////////////////////////////////////////////////////////////////////////// | |
/*********************************************************************************************** | |
* Everything underneath this line is managed by the CLI. | |
**********************************************************************************************/ | |
const barrels: string[] = [ | |
// Angular specific barrels. | |
'@angular/core', | |
'@angular/common', | |
'@angular/compiler', | |
'@angular/http', | |
'@angular/router', | |
'@angular/platform-browser', | |
'@angular/platform-browser-dynamic', | |
// Thirdparty barrels. | |
'rxjs', | |
// App specific barrels. | |
'app', | |
'app/shared', | |
'app/my-new-component', | |
/** @cli-barrel */ | |
]; | |
const cliSystemConfigPackages: any = {}; | |
barrels.forEach((barrelName: string) => { | |
cliSystemConfigPackages[barrelName] = { main: 'index' }; | |
}); | |
/** Type declaration for ambient System. */ | |
declare var System: any; | |
// Apply the CLI SystemJS configuration. | |
System.config({ | |
map: { | |
'@angular': 'vendor/@angular', | |
'rxjs': 'vendor/rxjs', | |
'main': 'main.js' | |
}, | |
packages: cliSystemConfigPackages | |
}); | |
// Apply the user's configuration. | |
System.config({ map, packages }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment