Skip to content

Instantly share code, notes, and snippets.

@ladyleet
Created July 7, 2016 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ladyleet/e3a268421f20fc69161575210e3bcb5c to your computer and use it in GitHub Desktop.
Save ladyleet/e3a268421f20fc69161575210e3bcb5c to your computer and use it in GitHub Desktop.
/** 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