Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update packaging to match angular/angular #3751

Merged
merged 3 commits into from
Mar 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const path = require('path');

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

require('./tools/gulp/gulpfile');
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"glob": "^7.1.1",
"google-cloud": "^0.48.0",
"gulp": "^3.9.1",
"gulp-better-rollup": "^1.0.2",
"gulp-clean": "^0.3.2",
"gulp-clean-css": "^3.0.3",
"gulp-cli": "^1.2.2",
Expand All @@ -83,6 +82,7 @@
"gulp-transform": "^1.1.0",
"hammerjs": "^2.0.8",
"highlight.js": "^9.9.0",
"http-rewrite-middleware": "^0.1.6",
"image-diff": "^1.6.3",
"jasmine-core": "^2.5.2",
"karma": "^1.5.0",
Expand All @@ -99,16 +99,17 @@
"node-sass": "^4.5.0",
"protractor": "^5.1.1",
"resolve-bin": "^0.4.0",
"rollup": "^0.41.6",
"run-sequence": "^1.2.2",
"sass": "^0.5.0",
"selenium-webdriver": "^3.1.0",
"stylelint": "^7.8.0",
"travis-after-modes": "0.0.7",
"ts-node": "^2.1.0",
"ts-node": "^3.0.0",
"tslint": "^4.4.2",
"tslint-no-unused-var": "0.0.6",
"typescript": "~2.1.6",
"uglify-js": "^2.8.7",
"typescript": "~2.1.1",
"uglify-js": "^2.8.14",
"web-animations-js": "^2.2.2"
}
}
12 changes: 6 additions & 6 deletions src/demo-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

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

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

<script src="vendor/core-js/client/core.js"></script>
<script src="vendor/web-animations-js/web-animations.min.js"></script>
<script src="vendor/systemjs/dist/system.src.js"></script>
<script src="vendor/zone.js/dist/zone.js"></script>
<script src="vendor/hammerjs/hammer.min.js"></script>
<script src="node_modules/core-js/client/core.js"></script>
<script src="node_modules/web-animations-js/web-animations.min.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/hammerjs/hammer.min.js"></script>

<script>
System.import('system-config.js').then(function () {
Expand Down
29 changes: 16 additions & 13 deletions src/demo-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@ declare const System: any;

// Apply the CLI SystemJS configuration.
System.config({
paths: {
'node:*': 'node_modules/*',
},
map: {
'rxjs': 'vendor/rxjs',
'rxjs': 'node:rxjs',
'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/animations': 'vendor/@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'vendor/@angular/animations/bundles/animations-browser.umd.js',
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
'@angular/router': 'node:@angular/router/bundles/router.umd.js',
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
'@angular/platform-browser': 'node:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser/animations':
'vendor/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
'node:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
'@angular/platform-browser-dynamic':
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/material': '@angular/material/bundles/material.umd.js'
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/material': 'dist/bundles/material.umd.js'
},
packages: {
// Thirdparty barrels.
Expand Down
19 changes: 3 additions & 16 deletions src/demo-app/tsconfig-aot.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
/* Config file for the Angular Compiler. Paths need to be relative to the dist folder. */
{
"extends": "./tsconfig",
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "es2015", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": true,
"target": "es5",
"baseUrl": "",
"typeRoots": [
"../node_modules/@types/!(node)"
],
"paths": {
"@angular/material": [
"./@angular/material"
]
"@angular/material": ["./material"]
}
},
"files": [
Expand All @@ -25,7 +13,6 @@
"./main-aot.ts"
],
"angularCompilerOptions": {
"skipTemplateCodegen": false,
"debug": true
"skipTemplateCodegen": false
}
}
11 changes: 3 additions & 8 deletions src/demo-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": true,
"outDir": "../../dist/",
"outDir": "../../dist/packages/demo-app",
"sourceMap": true,
"target": "es5",
"stripInternal": false,
Expand All @@ -18,7 +18,7 @@
],
"paths": {
"@angular/material": [
"../../dist/@angular/material"
"../../dist/packages/material"
]
}
},
Expand All @@ -27,10 +27,5 @@
"./demo-app-module.ts",
"./system-config.ts",
"./main.ts"
],
"angularCompilerOptions": {
"genDir": "../../dist",
"skipTemplateCodegen": true,
"debug": true
}
]
}
12 changes: 6 additions & 6 deletions src/e2e-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

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

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

<script src="vendor/core-js/client/core.js"></script>
<script src="vendor/web-animations-js/web-animations.min.js"></script>
<script src="vendor/systemjs/dist/system.src.js"></script>
<script src="vendor/zone.js/dist/zone.js"></script>
<script src="vendor/hammerjs/hammer.min.js"></script>
<script src="node_modules/core-js/client/core.js"></script>
<script src="node_modules/web-animations-js/web-animations.min.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/hammerjs/hammer.min.js"></script>

<script>
System.import('system-config.js').then(function () {
Expand Down
31 changes: 16 additions & 15 deletions src/e2e-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@ declare const System: any;

// Apply the CLI SystemJS configuration.
System.config({
paths: {
'node:*': 'node_modules/*',
},
map: {
'rxjs': 'vendor/rxjs',
'rxjs': 'node:rxjs',
'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/animations': 'vendor/@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'vendor/@angular/animations/bundles/animations-browser.umd.js',
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
'@angular/router': 'node:@angular/router/bundles/router.umd.js',
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
'@angular/platform-browser': 'node:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser/animations':
'vendor/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser/testing':
'vendor/@angular/platform-browser/bundles/platform-browser-testing.umd.js',
'node:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
'@angular/platform-browser-dynamic':
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/material': '@angular/material/bundles/material.umd.js'
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/material': 'dist/bundles/material.umd.js'
},
packages: {
// Thirdparty barrels.
Expand Down
4 changes: 2 additions & 2 deletions src/e2e-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": true,
"outDir": "../../dist/",
"outDir": "../../dist/packages/e2e-app",
"sourceMap": true,
"target": "es5",
"stripInternal": false,
Expand All @@ -18,7 +18,7 @@
],
"paths": {
"@angular/material": [
"../../dist/@angular/material"
"../../dist/packages/material"
]
}
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Angular Material
=======

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.

License: MIT
3 changes: 0 additions & 3 deletions src/lib/menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,4 @@ export class MdMenuModule {


export * from './menu';
export {MdMenuTrigger} from './menu-trigger';
export {fadeInItems, transformMenu} from './menu-animations';
export {MdMenu} from './menu-directive';
export {MdMenuItem} from './menu-item';
5 changes: 3 additions & 2 deletions src/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "2.0.0-beta.2",
"description": "Angular Material",
"main": "./bundles/material.umd.js",
"module": "./index.js",
"typings": "./index.d.ts",
"module": "./@angular/material.es5.js",
"es2015": "./@angular/material.js",
"typings": "./material.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/angular/material2.git"
Expand Down
4 changes: 0 additions & 4 deletions src/lib/progress-spinner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ class MdProgressSpinnerModule {

export {MdProgressSpinnerModule};
export * from './progress-spinner';

/** @deprecated */
export {MdProgressSpinnerModule as MdProgressCircleModule};
export {MdProgressSpinner as MdProgressCircle};
6 changes: 6 additions & 0 deletions src/lib/index.ts → src/lib/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @module
* @description
* Entry point for all public APIs of Angular Material.
*/

export * from './core';
export * from './module';

Expand Down
44 changes: 22 additions & 22 deletions src/lib/system-config-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,40 @@ declare const System: any;

// Apply the CLI SystemJS configuration.
System.config({
paths: {
'node:*': 'node_modules/*'
},
map: {
'rxjs': 'vendor/rxjs',
'rxjs': 'node:rxjs',
'main': 'main.js',

// Angular specific mappings.
'@angular/core': 'vendor/@angular/core/bundles/core.umd.js',
'@angular/core/testing': 'vendor/@angular/core/bundles/core-testing.umd.js',
'@angular/common': 'vendor/@angular/common/bundles/common.umd.js',
'@angular/common/testing': 'vendor/@angular/common/bundles/common-testing.umd.js',
'@angular/compiler': 'vendor/@angular/compiler/bundles/compiler.umd.js',
'@angular/compiler/testing': 'vendor/@angular/compiler/bundles/compiler-testing.umd.js',
'@angular/http': 'vendor/@angular/http/bundles/http.umd.js',
'@angular/http/testing': 'vendor/@angular/http/bundles/http-testing.umd.js',
'@angular/forms': 'vendor/@angular/forms/bundles/forms.umd.js',
'@angular/forms/testing': 'vendor/@angular/forms/bundles/forms-testing.umd.js',
'@angular/animations': 'vendor/@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'vendor/@angular/animations/bundles/animations-browser.umd.js',
'@angular/core': 'node:@angular/core/bundles/core.umd.js',
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.js',
'@angular/common': 'node:@angular/common/bundles/common.umd.js',
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.js',
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js',
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.js',
'@angular/http': 'node:@angular/http/bundles/http.umd.js',
'@angular/http/testing': 'node:@angular/http/bundles/http-testing.umd.js',
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js',
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.js',
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js',
'@angular/platform-browser/animations':
'vendor/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
'@angular/platform-browser': 'vendor/@angular/platform-browser/bundles/platform-browser.umd.js',
'node:@angular/platform-browser/bundles/platform-browser-animations.umd',
'@angular/platform-browser':
'node:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser/testing':
'vendor/@angular/platform-browser/bundles/platform-browser-testing.umd.js',
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
'@angular/platform-browser-dynamic':
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/platform-browser-dynamic/testing':
'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js'
},
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.
'.': {
Expand Down
13 changes: 13 additions & 0 deletions src/lib/tsconfig-specs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"types": ["jasmine"],
"experimentalDecorators": true
},
"include": [
"system-config-spec.ts",
"**/*.spec.ts"
]
}
Loading