Created
July 7, 2016 09:20
-
-
Save ladyleet/e3a268421f20fc69161575210e3bcb5c to your computer and use it in GitHub Desktop.
This file contains 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
/** Map relative paths to URLs. */ | |
const map: any = { | |
'@angular2-material': 'vendor/@angular2-material' | |
}; | |
/** User packages configuration. */ | |
const materialPackages:string[] = [ | |
'core', | |
'button' | |
]; | |
const packages:any = createCustomConfig(materialPackages); | |
function createCustomConfig(packages: string[]): any { | |
return packages.reduce((packageConfig: any, packageName: string) => { | |
packageConfig[`@angular2-material/${packageName}`] = { | |
format: 'cjs', | |
defaultExtension: 'js', | |
main: packageName | |
}; | |
return packageConfig; | |
}, {}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment