@@ -4,16 +4,16 @@ import {buildConfig} from './build-config';
4
4
5
5
/** Method that converts dash-case strings to a camel-based string. */
6
6
export const dashCaseToCamelCase =
7
- ( str : string ) => str . replace ( / - ( [ a - z ] ) / g, ( g ) => g [ 1 ] . toUpperCase ( ) ) ;
7
+ ( str : string ) => str . replace ( / - ( [ a - z ] ) / g, ( g ) => g [ 1 ] . toUpperCase ( ) ) ;
8
8
9
9
/** Generates rollup entry point mappings for the given package and entry points. */
10
10
function generateRollupEntryPoints ( packageName : string , entryPoints : string [ ] ) :
11
- { [ k : string ] : string } {
12
- return entryPoints . reduce ( ( globals : { [ k : string ] : string } , entryPoint : string ) => {
13
- globals [ `@angular/${ packageName } /${ entryPoint } ` ] =
14
- `ng.${ dashCaseToCamelCase ( packageName ) } .${ dashCaseToCamelCase ( entryPoint ) } ` ;
15
- return globals ;
16
- } , { } ) ;
11
+ { [ k : string ] : string } {
12
+ return entryPoints . reduce ( ( globals : { [ k : string ] : string } , entryPoint : string ) => {
13
+ globals [ `@angular/${ packageName } /${ entryPoint } ` ] =
14
+ `ng.${ dashCaseToCamelCase ( packageName ) } .${ dashCaseToCamelCase ( entryPoint ) } ` ;
15
+ return globals ;
16
+ } , { } ) ;
17
17
}
18
18
19
19
/** List of potential secondary entry-points for the cdk package. */
@@ -38,37 +38,37 @@ const rollupCdkExperimentalEntryPoints =
38
38
39
39
/** Map of globals that are used inside of the different packages. */
40
40
export const rollupGlobals = {
41
- 'moment' : 'moment' ,
42
- 'tslib' : 'tslib' ,
41
+ 'moment' : 'moment' ,
42
+ 'tslib' : 'tslib' ,
43
43
44
- '@angular/animations' : 'ng.animations' ,
45
- '@angular/common' : 'ng.common' ,
46
- '@angular/common/http' : 'ng.common.http' ,
47
- '@angular/common/http/testing' : 'ng.common.http.testing' ,
48
- '@angular/common/testing' : 'ng.common.testing' ,
49
- '@angular/core' : 'ng.core' ,
50
- '@angular/core/testing' : 'ng.core.testing' ,
51
- '@angular/forms' : 'ng.forms' ,
52
- '@angular/platform-browser' : 'ng.platformBrowser' ,
53
- '@angular/platform-browser-dynamic' : 'ng.platformBrowserDynamic' ,
54
- '@angular/platform-browser-dynamic/testing' : 'ng.platformBrowserDynamic.testing' ,
55
- '@angular/platform-browser/animations' : 'ng.platformBrowser.animations' ,
56
- '@angular/platform-server' : 'ng.platformServer' ,
57
- '@angular/router' : 'ng.router' ,
44
+ '@angular/animations' : 'ng.animations' ,
45
+ '@angular/common' : 'ng.common' ,
46
+ '@angular/common/http' : 'ng.common.http' ,
47
+ '@angular/common/http/testing' : 'ng.common.http.testing' ,
48
+ '@angular/common/testing' : 'ng.common.testing' ,
49
+ '@angular/core' : 'ng.core' ,
50
+ '@angular/core/testing' : 'ng.core.testing' ,
51
+ '@angular/forms' : 'ng.forms' ,
52
+ '@angular/platform-browser' : 'ng.platformBrowser' ,
53
+ '@angular/platform-browser-dynamic' : 'ng.platformBrowserDynamic' ,
54
+ '@angular/platform-browser-dynamic/testing' : 'ng.platformBrowserDynamic.testing' ,
55
+ '@angular/platform-browser/animations' : 'ng.platformBrowser.animations' ,
56
+ '@angular/platform-server' : 'ng.platformServer' ,
57
+ '@angular/router' : 'ng.router' ,
58
58
59
- // Some packages are not really needed for the UMD bundles, but for the missingRollupGlobals rule.
60
- '@angular/cdk' : 'ng.cdk' ,
61
- '@angular/cdk-experimental' : 'ng.cdkExperimental' ,
62
- '@angular/material' : 'ng.material' ,
63
- '@angular/material-examples' : 'ng.materialExamples' ,
64
- '@angular/material-experimental' : 'ng.materialExperimental' ,
65
- '@angular/material-moment-adapter' : 'ng.materialMomentAdapter' ,
59
+ // Some packages are not really needed for the UMD bundles, but for the missingRollupGlobals rule.
60
+ '@angular/cdk' : 'ng.cdk' ,
61
+ '@angular/cdk-experimental' : 'ng.cdkExperimental' ,
62
+ '@angular/material' : 'ng.material' ,
63
+ '@angular/material-examples' : 'ng.materialExamples' ,
64
+ '@angular/material-experimental' : 'ng.materialExperimental' ,
65
+ '@angular/material-moment-adapter' : 'ng.materialMomentAdapter' ,
66
66
67
- // Include secondary entry-points of the cdk and material packages
68
- ...rollupCdkEntryPoints ,
69
- ...rollupMatEntryPoints ,
70
- ...rollupCdkExperimentalEntryPoints ,
67
+ // Include secondary entry-points of the cdk and material packages
68
+ ...rollupCdkEntryPoints ,
69
+ ...rollupMatEntryPoints ,
70
+ ...rollupCdkExperimentalEntryPoints ,
71
71
72
- 'rxjs' : 'rxjs' ,
73
- 'rxjs/operators' : 'rxjs.operators' ,
72
+ 'rxjs' : 'rxjs' ,
73
+ 'rxjs/operators' : 'rxjs.operators' ,
74
74
} ;
0 commit comments