-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(packaging): move packaging to a single "@angular/material" (#1286)
- Loading branch information
Showing
86 changed files
with
343 additions
and
1,039 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,34 @@ | ||
/*********************************************************************************************** | ||
* User Configuration. | ||
**********************************************************************************************/ | ||
|
||
const components = [ | ||
'all', | ||
'button', | ||
'card', | ||
'checkbox', | ||
'dialog', | ||
'grid-list', | ||
'icon', | ||
'input', | ||
'list', | ||
'menu', | ||
'progress-bar', | ||
'progress-circle', | ||
'radio', | ||
'select', | ||
'sidenav', | ||
'slider', | ||
'slide-toggle', | ||
'button-toggle', | ||
'tabs', | ||
'toolbar', | ||
'tooltip', | ||
]; | ||
|
||
|
||
/** User packages configuration. */ | ||
const packages: any = { | ||
'@angular2-material/core': { | ||
format: 'cjs', | ||
main: 'core.umd.js' | ||
}, | ||
// Set the default extension for the root package, because otherwise the demo-app can't | ||
// be built within the production mode. Due to missing file extensions. | ||
'.': { | ||
defaultExtension: 'js' | ||
} | ||
}; | ||
components.forEach(name => { | ||
packages[`@angular2-material/${name}`] = { | ||
format: 'cjs', | ||
main: `${name}.umd.js` | ||
}; | ||
}); | ||
|
||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////// | ||
/*********************************************************************************************** | ||
* Everything underneath this line is managed by the CLI. | ||
**********************************************************************************************/ | ||
const angularPackages = { | ||
// Angular specific barrels. | ||
'@angular/core': { main: 'bundles/core.umd.js'}, | ||
'@angular/core/testing': { main: 'bundles/core-testing.umd.js'}, | ||
'@angular/common': { main: 'bundles/common.umd.js'}, | ||
'@angular/compiler': { main: 'bundles/compiler.umd.js'}, | ||
'@angular/http': { main: 'bundles/http.umd.js'}, | ||
'@angular/forms': { main: 'bundles/forms.umd.js'}, | ||
'@angular/router': { main: 'bundles/router.umd.js'}, | ||
'@angular/platform-browser': { main: 'bundles/platform-browser.umd.js'}, | ||
'@angular/platform-browser-dynamic': { main: 'bundles/platform-browser-dynamic.umd.js'}, | ||
'@angular/platform-browser-dynamic/testing': { | ||
main: 'bundles/platform-browser-dynamic-testing.umd.js' | ||
}, | ||
}; | ||
|
||
const barrels: string[] = [ | ||
// Thirdparty barrels. | ||
'rxjs', | ||
|
||
// App specific barrels. | ||
'demo-app', | ||
'button-toggle', | ||
'gestures', | ||
'live-announcer', | ||
'portal', | ||
'overlay', | ||
...components | ||
/** @cli-barrel */ | ||
]; | ||
|
||
const _cliSystemConfig: any = angularPackages; | ||
barrels.forEach((barrelName: string) => { | ||
_cliSystemConfig[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' | ||
'main': 'main.js', | ||
|
||
// Angular specific mappings. | ||
'@angular/core': 'vendor/@angular/core/bundles/core.umd.js', | ||
'@angular/common': 'vendor/@angular/common/bundles/common.umd.js', | ||
'@angular/compiler': 'vendor/@angular/compiler/bundles/compiler.umd.js', | ||
'@angular/http': 'vendor/@angular/http/bundles/http.umd.js', | ||
'@angular/forms': 'vendor/@angular/forms/bundles/forms.umd.js', | ||
'@angular/router': 'vendor/@angular/router/bundles/router.umd.js', | ||
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js', | ||
'@angular/platform-browser-dynamic': | ||
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', | ||
}, | ||
packages: _cliSystemConfig | ||
packages: { | ||
// Thirdparty barrels. | ||
'rxjs': { main: 'index' }, | ||
'@angular/material': { | ||
format: 'cjs', | ||
main: 'material.umd.js' | ||
}, | ||
// Set the default extension for the root package, because otherwise the demo-app can't | ||
// be built within the production mode. Due to missing file extensions. | ||
'.': { | ||
defaultExtension: 'js' | ||
} | ||
} | ||
}); | ||
|
||
// Apply the user's configuration. | ||
System.config({ packages }); |
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
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
Oops, something went wrong.