Skip to content

Commit 317e6b2

Browse files
committed
build: create example package
* Initial refactoring that allows Material to build multiple packages using a shared logic.
1 parent 5d794b1 commit 317e6b2

File tree

385 files changed

+310
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+310
-157
lines changed

README.md

Lines changed: 1 addition & 1 deletion

scripts/closure-compiler/build-devapp-bundle.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ OPTS=(
3939

4040
# List of path prefixes to be removed from ES6 & CommonJS modules.
4141
"--js_module_root=dist/packages"
42-
"--js_module_root=dist/release"
42+
"--js_module_root=dist/releases/material"
4343
"--js_module_root=node_modules/@angular/core"
4444
"--js_module_root=node_modules/@angular/common"
4545
"--js_module_root=node_modules/@angular/compiler"
@@ -57,7 +57,7 @@ OPTS=(
5757
"--debug"
5858

5959
# Include the Material FESM bundle
60-
dist/release/@angular/material.js
60+
dist/releases/material/@angular/material.js
6161

6262
# Include all Angular FESM bundles.
6363
node_modules/@angular/core/@angular/core.js

scripts/release/publish-build-artifacts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -e -o pipefail
88
# Go to the project root directory
99
cd $(dirname $0)/../..
1010

11-
buildDir="dist/release"
11+
buildDir="dist/releases/material"
1212
buildVersion=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
1313

1414
commitSha=$(git rev-parse --short HEAD)

src/examples/autocomplete-overview/autocomplete-overview-example.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {Component} from '@angular/core';
22
import {FormControl} from '@angular/forms';
3+
34
import 'rxjs/add/operator/startWith';
5+
import 'rxjs/add/operator/map';
46

57
@Component({
68
selector: 'autocomplete-overview-example',

src/examples/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "@angular/material-examples",
3+
"version": "2.0.0-beta.3",
4+
"description": "Angular Material",
5+
"main": "./bundles/examples.umd.js",
6+
"module": "./@angular/examples.es5.js",
7+
"es2015": "./@angular/examples.js",
8+
"typings": "./examples.d.ts",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/angular/material2.git"
12+
},
13+
"keywords": [
14+
"angular",
15+
"material",
16+
"material design",
17+
"components"
18+
],
19+
"license": "MIT",
20+
"bugs": {
21+
"url": "https://github.com/angular/material2/issues"
22+
},
23+
"homepage": "https://github.com/angular/material2#readme",
24+
"peerDependencies": {
25+
"@angular/core": "^4.0.0",
26+
"@angular/common": "^4.0.0",
27+
"@angular/http": "^4.0.0"
28+
}
29+
}

src/examples/public_api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './example-data';
2+
export * from './example-module';

src/examples/tsconfig-build.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// TypeScript config file that is used to compile the examples. Target environment needs to be
2+
// ES2015 since the build process will create FESM bundles using rollup.
3+
{
4+
"compilerOptions": {
5+
"baseUrl": ".",
6+
"declaration": true,
7+
"stripInternal": false,
8+
"experimentalDecorators": true,
9+
"module": "es2015",
10+
"moduleResolution": "node",
11+
"outDir": "../../dist/packages/examples",
12+
"paths": {
13+
"@angular/material": [
14+
"../../dist/packages/material"
15+
]
16+
},
17+
"rootDir": ".",
18+
"sourceMap": true,
19+
"inlineSources": true,
20+
"target": "es2015",
21+
"lib": ["es2015", "dom"],
22+
"skipLibCheck": true,
23+
"types": []
24+
},
25+
"files": [
26+
"public_api.ts"
27+
],
28+
"angularCompilerOptions": {
29+
"annotateForClosureCompiler": true,
30+
"strictMetadataEmit": true,
31+
"flatModuleOutFile": "index.js",
32+
"skipTemplateCodegen": true
33+
}
34+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)