Skip to content

Commit 2a65c0a

Browse files
committed
build: restructure release output
1 parent 00dc42d commit 2a65c0a

37 files changed

+897
-699
lines changed

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const path = require('path');
88

99
// Register TS compilation.
1010
require('ts-node').register({
11-
project: path.join(__dirname, 'tools/gulp')
11+
project: path.join(__dirname, 'tools/gulp/tsconfig.json')
1212
});
1313

1414
require('./tools/gulp/gulpfile');

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"glob": "^7.1.1",
6767
"google-cloud": "^0.48.0",
6868
"gulp": "^3.9.1",
69-
"gulp-better-rollup": "^1.0.2",
7069
"gulp-clean": "^0.3.2",
7170
"gulp-clean-css": "^3.0.3",
7271
"gulp-cli": "^1.2.2",
@@ -83,6 +82,7 @@
8382
"gulp-transform": "^1.1.0",
8483
"hammerjs": "^2.0.8",
8584
"highlight.js": "^9.9.0",
85+
"http-rewrite-middleware": "^0.1.6",
8686
"image-diff": "^1.6.3",
8787
"jasmine-core": "^2.5.2",
8888
"karma": "^1.5.0",
@@ -99,16 +99,17 @@
9999
"node-sass": "^4.5.0",
100100
"protractor": "^5.1.1",
101101
"resolve-bin": "^0.4.0",
102+
"rollup": "^0.41.6",
102103
"run-sequence": "^1.2.2",
103104
"sass": "^0.5.0",
104105
"selenium-webdriver": "^3.1.0",
105106
"stylelint": "^7.8.0",
106107
"travis-after-modes": "0.0.7",
107-
"ts-node": "^2.1.0",
108+
"ts-node": "^3.0.0",
108109
"tslint": "^4.4.2",
109110
"tslint-no-unused-var": "0.0.6",
110-
"typescript": "~2.1.6",
111-
"uglify-js": "^2.8.7",
111+
"typescript": "~2.2.1",
112+
"uglify-js": "^2.8.14",
112113
"web-animations-js": "^2.2.2"
113114
}
114115
}

src/demo-app/index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88

99
<link rel="icon" type="image/x-icon" href="favicon.ico">
1010
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
11-
<link href="@angular/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
11+
<link href="dist/packages/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
1212

1313
<!-- FontAwesome for md-icon demo. -->
1414
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
1515
</head>
1616
<body>
1717
<demo-app>Loading...</demo-app>
1818

19-
<script src="vendor/core-js/client/core.js"></script>
20-
<script src="vendor/web-animations-js/web-animations.min.js"></script>
21-
<script src="vendor/systemjs/dist/system.src.js"></script>
22-
<script src="vendor/zone.js/dist/zone.js"></script>
23-
<script src="vendor/hammerjs/hammer.min.js"></script>
19+
<script src="node_modules/core-js/client/core.js"></script>
20+
<script src="node_modules/web-animations-js/web-animations.min.js"></script>
21+
<script src="node_modules/systemjs/dist/system.src.js"></script>
22+
<script src="node_modules/zone.js/dist/zone.js"></script>
23+
<script src="node_modules/hammerjs/hammer.min.js"></script>
2424

2525
<script>
2626
System.import('system-config.js').then(function () {

src/demo-app/system-config.ts

+16-13
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,28 @@ declare const System: any;
33

44
// Apply the CLI SystemJS configuration.
55
System.config({
6+
paths: {
7+
'node:*': 'node_modules/*',
8+
},
69
map: {
7-
'rxjs': 'vendor/rxjs',
10+
'rxjs': 'node:rxjs',
811
'main': 'main.js',
912

1013
// Angular specific mappings.
11-
'@angular/core': 'vendor/@angular/core/bundles/core.umd.js',
12-
'@angular/common': 'vendor/@angular/common/bundles/common.umd.js',
13-
'@angular/compiler': 'vendor/@angular/compiler/bundles/compiler.umd.js',
14-
'@angular/http': 'vendor/@angular/http/bundles/http.umd.js',
15-
'@angular/forms': 'vendor/@angular/forms/bundles/forms.umd.js',
16-
'@angular/router': 'vendor/@angular/router/bundles/router.umd.js',
17-
'@angular/animations': 'vendor/@angular/animations/bundles/animations.umd.js',
18-
'@angular/animations/browser': 'vendor/@angular/animations/bundles/animations-browser.umd.js',
19-
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js',
14+
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
15+
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
16+
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
17+
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
18+
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
19+
'@angular/router': 'node:@angular/router/bundles/router.umd.js',
20+
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
21+
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
22+
'@angular/platform-browser': 'node:@angular/platform-browser/bundles/platform-browser.umd.js',
2023
'@angular/platform-browser/animations':
21-
'vendor/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
24+
'node:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
2225
'@angular/platform-browser-dynamic':
23-
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
24-
'@angular/material': '@angular/material/bundles/material.umd.js'
26+
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
27+
'@angular/material': 'dist/bundles/material.umd.js'
2528
},
2629
packages: {
2730
// Thirdparty barrels.

src/demo-app/tsconfig-aot.json

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
/* Config file for the Angular Compiler. Paths need to be relative to the dist folder. */
22
{
3+
"extends": "./tsconfig",
34
"compilerOptions": {
4-
"emitDecoratorMetadata": true,
55
"experimentalDecorators": true,
6-
"lib": ["es6", "es2015", "dom"],
7-
"module": "commonjs",
8-
"moduleResolution": "node",
9-
"noEmitOnError": true,
10-
"noImplicitAny": true,
11-
"target": "es5",
12-
"baseUrl": "",
13-
"typeRoots": [
14-
"../node_modules/@types/!(node)"
15-
],
166
"paths": {
17-
"@angular/material": [
18-
"./@angular/material"
19-
]
7+
"@angular/material": ["./material"]
208
}
219
},
2210
"files": [
@@ -25,7 +13,6 @@
2513
"./main-aot.ts"
2614
],
2715
"angularCompilerOptions": {
28-
"skipTemplateCodegen": false,
29-
"debug": true
16+
"skipTemplateCodegen": false
3017
}
3118
}

src/demo-app/tsconfig.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"moduleResolution": "node",
99
"noEmitOnError": true,
1010
"noImplicitAny": true,
11-
"outDir": "../../dist/",
11+
"outDir": "../../dist/packages/demo-app",
1212
"sourceMap": true,
1313
"target": "es5",
1414
"stripInternal": false,
@@ -18,7 +18,7 @@
1818
],
1919
"paths": {
2020
"@angular/material": [
21-
"../../dist/@angular/material"
21+
"../../dist/packages/material"
2222
]
2323
}
2424
},
@@ -27,10 +27,5 @@
2727
"./demo-app-module.ts",
2828
"./system-config.ts",
2929
"./main.ts"
30-
],
31-
"angularCompilerOptions": {
32-
"genDir": "../../dist",
33-
"skipTemplateCodegen": true,
34-
"debug": true
35-
}
30+
]
3631
}

src/e2e-app/index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88

99
<link rel="icon" type="image/x-icon" href="favicon.ico">
1010
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
11-
<link href="@angular/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
11+
<link href="dist/packages/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
1212

1313
<!-- FontAwesome for md-icon demo. -->
1414
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
1515
</head>
1616
<body>
1717
<e2e-app>Loading...</e2e-app>
1818

19-
<script src="vendor/core-js/client/core.js"></script>
20-
<script src="vendor/web-animations-js/web-animations.min.js"></script>
21-
<script src="vendor/systemjs/dist/system.src.js"></script>
22-
<script src="vendor/zone.js/dist/zone.js"></script>
23-
<script src="vendor/hammerjs/hammer.min.js"></script>
19+
<script src="node_modules/core-js/client/core.js"></script>
20+
<script src="node_modules/web-animations-js/web-animations.min.js"></script>
21+
<script src="node_modules/systemjs/dist/system.src.js"></script>
22+
<script src="node_modules/zone.js/dist/zone.js"></script>
23+
<script src="node_modules/hammerjs/hammer.min.js"></script>
2424

2525
<script>
2626
System.import('system-config.js').then(function () {

src/e2e-app/system-config.ts

+16-15
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,28 @@ declare const System: any;
33

44
// Apply the CLI SystemJS configuration.
55
System.config({
6+
paths: {
7+
'node:*': 'node_modules/*',
8+
},
69
map: {
7-
'rxjs': 'vendor/rxjs',
10+
'rxjs': 'node:rxjs',
811
'main': 'main.js',
912

1013
// Angular specific mappings.
11-
'@angular/core': 'vendor/@angular/core/bundles/core.umd.js',
12-
'@angular/common': 'vendor/@angular/common/bundles/common.umd.js',
13-
'@angular/compiler': 'vendor/@angular/compiler/bundles/compiler.umd.js',
14-
'@angular/http': 'vendor/@angular/http/bundles/http.umd.js',
15-
'@angular/forms': 'vendor/@angular/forms/bundles/forms.umd.js',
16-
'@angular/router': 'vendor/@angular/router/bundles/router.umd.js',
17-
'@angular/animations': 'vendor/@angular/animations/bundles/animations.umd.js',
18-
'@angular/animations/browser': 'vendor/@angular/animations/bundles/animations-browser.umd.js',
14+
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
15+
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
16+
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
17+
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
18+
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
19+
'@angular/router': 'node:@angular/router/bundles/router.umd.js',
20+
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
21+
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
22+
'@angular/platform-browser': 'node:@angular/platform-browser/bundles/platform-browser.umd.js',
1923
'@angular/platform-browser/animations':
20-
'vendor/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
21-
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js',
22-
'@angular/platform-browser/testing':
23-
'vendor/@angular/platform-browser/bundles/platform-browser-testing.umd.js',
24+
'node:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
2425
'@angular/platform-browser-dynamic':
25-
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
26-
'@angular/material': '@angular/material/bundles/material.umd.js'
26+
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
27+
'@angular/material': 'dist/bundles/material.umd.js'
2728
},
2829
packages: {
2930
// Thirdparty barrels.

src/e2e-app/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"moduleResolution": "node",
99
"noEmitOnError": true,
1010
"noImplicitAny": true,
11-
"outDir": "../../dist/",
11+
"outDir": "../../dist/packages/e2e-app",
1212
"sourceMap": true,
1313
"target": "es5",
1414
"stripInternal": false,
@@ -18,7 +18,7 @@
1818
],
1919
"paths": {
2020
"@angular/material": [
21-
"../../dist/@angular/material"
21+
"../../dist/packages/material"
2222
]
2323
}
2424
},

src/lib/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Angular Material
2+
=======
3+
4+
The sources for this package are in the main [Angular Material](https://github.com/angular/material2) repo. Please file issues and pull requests against that repo.
5+
6+
License: MIT

src/lib/menu/index.ts

-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@ export class MdMenuModule {
3131

3232

3333
export * from './menu';
34-
export {MdMenuTrigger} from './menu-trigger';
3534
export {fadeInItems, transformMenu} from './menu-animations';
36-
export {MdMenu} from './menu-directive';
37-
export {MdMenuItem} from './menu-item';

src/lib/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"version": "2.0.0-beta.2",
44
"description": "Angular Material",
55
"main": "./bundles/material.umd.js",
6-
"module": "./index.js",
7-
"typings": "./index.d.ts",
6+
"module": "./@angular/material.es5.js",
7+
"es2015": "./@angular/material.js",
8+
"typings": "./material.d.ts",
89
"repository": {
910
"type": "git",
1011
"url": "https://github.com/angular/material2.git"

src/lib/progress-spinner/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,3 @@ class MdProgressSpinnerModule {
3636

3737
export {MdProgressSpinnerModule};
3838
export * from './progress-spinner';
39-
40-
/** @deprecated */
41-
export {MdProgressSpinnerModule as MdProgressCircleModule};
42-
export {MdProgressSpinner as MdProgressCircle};

src/lib/index.ts renamed to src/lib/public_api.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* @module
3+
* @description
4+
* Entry point for all public APIs of Angular Material.
5+
*/
6+
17
export * from './core';
28
export * from './module';
39

src/lib/system-config-spec.ts

+22-22
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@ declare const System: any;
33

44
// Apply the CLI SystemJS configuration.
55
System.config({
6+
paths: {
7+
'node:*': 'node_modules/*'
8+
},
69
map: {
7-
'rxjs': 'vendor/rxjs',
10+
'rxjs': 'node:rxjs',
811
'main': 'main.js',
912

1013
// Angular specific mappings.
11-
'@angular/core': 'vendor/@angular/core/bundles/core.umd.js',
12-
'@angular/core/testing': 'vendor/@angular/core/bundles/core-testing.umd.js',
13-
'@angular/common': 'vendor/@angular/common/bundles/common.umd.js',
14-
'@angular/common/testing': 'vendor/@angular/common/bundles/common-testing.umd.js',
15-
'@angular/compiler': 'vendor/@angular/compiler/bundles/compiler.umd.js',
16-
'@angular/compiler/testing': 'vendor/@angular/compiler/bundles/compiler-testing.umd.js',
17-
'@angular/http': 'vendor/@angular/http/bundles/http.umd.js',
18-
'@angular/http/testing': 'vendor/@angular/http/bundles/http-testing.umd.js',
19-
'@angular/forms': 'vendor/@angular/forms/bundles/forms.umd.js',
20-
'@angular/forms/testing': 'vendor/@angular/forms/bundles/forms-testing.umd.js',
21-
'@angular/animations': 'vendor/@angular/animations/bundles/animations.umd.js',
22-
'@angular/animations/browser': 'vendor/@angular/animations/bundles/animations-browser.umd.js',
14+
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
15+
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.js',
16+
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
17+
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.js',
18+
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
19+
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.js',
20+
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
21+
'@angular/http/testing': 'node:@angular/http/bundles/http-testing.umd.js',
22+
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
23+
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.js',
24+
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
25+
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
2326
'@angular/platform-browser/animations':
24-
'vendor/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
25-
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js',
27+
'node:@angular/platform-browser/bundles/platform-browser-animations.umd',
28+
'@angular/platform-browser':
29+
'node:@angular/platform-browser/bundles/platform-browser.umd.js',
2630
'@angular/platform-browser/testing':
27-
'vendor/@angular/platform-browser/bundles/platform-browser-testing.umd.js',
31+
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
2832
'@angular/platform-browser-dynamic':
29-
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
33+
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
3034
'@angular/platform-browser-dynamic/testing':
31-
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
35+
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js'
3236
},
3337
packages: {
3438
// Thirdparty barrels.
3539
'rxjs': { main: 'index' },
36-
'@angular/material': {
37-
format: 'cjs',
38-
main: 'material.umd.js'
39-
},
4040
// Set the default extension for the root package, because otherwise the demo-app can't
4141
// be built within the production mode. Due to missing file extensions.
4242
'.': {

src/lib/tsconfig-specs.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "./tsconfig",
3+
"compilerOptions": {
4+
"module": "commonjs",
5+
"target": "es5",
6+
"types": ["jasmine"],
7+
"experimentalDecorators": true
8+
},
9+
"include": [
10+
"system-config-spec.ts",
11+
"**/*.spec.ts"
12+
]
13+
}

0 commit comments

Comments
 (0)