-
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.
build: create material-examples package (#4046)
- Loading branch information
1 parent
3545df7
commit abd2ac6
Showing
164 changed files
with
311 additions
and
182 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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...overview/autocomplete-overview-example.ts → ...overview/autocomplete-overview-example.ts
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
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.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "@angular/material-examples", | ||
"version": "2.0.0-beta.3", | ||
"description": "Angular Material Examples", | ||
"main": "./bundles/material-examples.umd.js", | ||
"module": "./@angular/material-examples.es5.js", | ||
"es2015": "./@angular/material-examples.js", | ||
"typings": "./material-examples.d.ts", | ||
"private": true, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/angular/material2.git" | ||
}, | ||
"keywords": [ | ||
"angular", | ||
"material", | ||
"material design", | ||
"components" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/angular/material2/issues" | ||
}, | ||
"homepage": "https://github.com/angular/material2#readme", | ||
"peerDependencies": { | ||
"@angular/core": "^4.0.0", | ||
"@angular/common": "^4.0.0", | ||
"@angular/http": "^4.0.0" | ||
} | ||
} |
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.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './example-data'; | ||
export * from './example-module'; |
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.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// TypeScript config file that is used to compile the examples. Target environment needs to be | ||
// ES2015 since the build process will create FESM bundles using rollup. | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
"stripInternal": false, | ||
"experimentalDecorators": true, | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
"outDir": "../../dist/packages/examples", | ||
"paths": { | ||
"@angular/material": [ | ||
"../../dist/packages/material" | ||
] | ||
}, | ||
"rootDir": ".", | ||
"sourceMap": true, | ||
"inlineSources": true, | ||
"target": "es2015", | ||
"lib": ["es2015", "dom"], | ||
"skipLibCheck": true, | ||
"types": [] | ||
}, | ||
"files": [ | ||
"public_api.ts" | ||
], | ||
"angularCompilerOptions": { | ||
"annotateForClosureCompiler": true, | ||
"strictMetadataEmit": true, | ||
"flatModuleOutFile": "index.js", | ||
"skipTemplateCodegen": true | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import {task} from 'gulp'; | ||
import {join} from 'path'; | ||
import {main as tsc} from '@angular/tsc-wrapped'; | ||
import {SOURCE_ROOT, DIST_EXAMPLES} from '../constants'; | ||
import {sequenceTask, copyTask} from '../util/task_helpers'; | ||
import {buildModuleEntry, composeRelease} from '../util/package-build'; | ||
|
||
// There are no type definitions available for these imports. | ||
const inlineResources = require('../../../scripts/release/inline-resources'); | ||
|
||
const examplesRoot = join(SOURCE_ROOT, 'material-examples'); | ||
const tsconfigPath = join(examplesRoot, 'tsconfig-build.json'); | ||
|
||
// Paths to the different output files and directories. | ||
const examplesOut = DIST_EXAMPLES; | ||
const examplesMain = join(examplesOut, 'public_api.js'); | ||
|
||
task('examples:clean-build', sequenceTask('clean', 'examples:build')); | ||
|
||
task('examples:build', sequenceTask( | ||
// The examples depend on the library. Build the library first. | ||
'library:build', | ||
// Build ESM and copy HTML assets to the dist. | ||
['examples:build:esm', 'examples:assets:html'], | ||
// Inline assets into ESM output. | ||
'examples:assets:inline', | ||
// Build bundles on top of inlined ESM output. | ||
'examples:build:bundles', | ||
)); | ||
|
||
task('examples:release', ['examples:clean-build'], () => composeRelease('material-examples')); | ||
|
||
/** | ||
* TypeScript compilation tasks. Tasks are creating ESM, FESM, UMD bundles for releases. | ||
*/ | ||
|
||
task('examples:build:esm', () => tsc(tsconfigPath, {basePath: examplesRoot})); | ||
task('examples:build:bundles', () => buildModuleEntry(examplesMain, 'material-examples')); | ||
|
||
/** | ||
* Asset tasks. Copying and inlining CSS, HTML files into the ESM output. | ||
*/ | ||
|
||
task('examples:assets:html', copyTask(join(examplesRoot, '**/*.+(html|css)'), examplesOut)); | ||
task('examples:assets:inline', () => inlineResources(examplesOut)); |
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.