mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix: remove circular deps and ci check (#608)
This commit is contained in:
@@ -36,6 +36,7 @@ env:
|
||||
matrix:
|
||||
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
||||
- MODE=lint
|
||||
- MODE=circular_deps
|
||||
- MODE=e2e
|
||||
- MODE=saucelabs_required
|
||||
- MODE=browserstack_required
|
||||
|
||||
+4
-2
@@ -8,12 +8,13 @@
|
||||
"url": "https://github.com/angular/material2.git"
|
||||
},
|
||||
"scripts": {
|
||||
"ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js",
|
||||
"ci:forbidden-identifiers": "node ./scripts/ci/forbidden-identifiers.js",
|
||||
"build": "ng build",
|
||||
"demo-app": "ng serve",
|
||||
"test": "karma start test/karma.conf.js",
|
||||
"tslint": "tslint -c tslint.json 'src/**/*.ts'",
|
||||
"stylelint": "stylelint 'src/**/*.scss' --config stylelint-config.json --syntax scss",
|
||||
"check-circular-deps": "madge --circular ./dist",
|
||||
"typings": "typings install --ambient",
|
||||
"postinstall": "npm run typings",
|
||||
"e2e": "protractor",
|
||||
@@ -60,13 +61,14 @@
|
||||
"karma-firefox-launcher": "^0.1.7",
|
||||
"karma-jasmine": "^0.3.8",
|
||||
"karma-sauce-launcher": "^0.2.14",
|
||||
"madge": "^0.5.3",
|
||||
"node-sass": "^3.4.2",
|
||||
"protractor": "^3.3.0",
|
||||
"protractor-accessibility-plugin": "0.1.1",
|
||||
"sass": "^0.5.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"symlink-or-copy": "^1.0.1",
|
||||
"stylelint": "^6.5.1",
|
||||
"symlink-or-copy": "^1.0.1",
|
||||
"ts-node": "^0.7.3",
|
||||
"tslint": "^3.5.0",
|
||||
"typescript": "^1.9.0-dev",
|
||||
|
||||
@@ -18,7 +18,9 @@ wait_for_tunnel
|
||||
if is_lint; then
|
||||
npm run tslint
|
||||
npm run ci:forbidden-identifiers
|
||||
npm run stylelint
|
||||
npm run stylelint
|
||||
elif is_circular_deps_check; then
|
||||
npm run check-circular-deps
|
||||
elif is_e2e; then
|
||||
MD_APP=e2e ng serve &
|
||||
sleep 20
|
||||
|
||||
@@ -8,3 +8,7 @@ is_e2e() {
|
||||
is_lint() {
|
||||
[[ "$MODE" = lint ]]
|
||||
}
|
||||
|
||||
is_circular_deps_check() {
|
||||
[[ "$MODE" = circular_deps ]]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
/**
|
||||
* Converts values into strings. Falsy values become empty strings.
|
||||
* @internal
|
||||
*/
|
||||
export function coerceToString(value: string | number): string {
|
||||
return `${value || ''}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a value that might be a string into a number.
|
||||
* @internal
|
||||
*/
|
||||
export function coerceToNumber(value: string | number): number {
|
||||
return typeof value === 'string' ? parseInt(value, 10) : value;
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
import {MdGridListColsError} from './grid-list-errors';
|
||||
import {Dir} from '@angular2-material/core/rtl/dir';
|
||||
import {MdLine} from '@angular2-material/core/line/line';
|
||||
import {coerceToString, coerceToNumber} from './grid-list-measure';
|
||||
|
||||
// TODO(kara): Conditional (responsive) column count / row size.
|
||||
// TODO(kara): Re-layout on window resize / media change (debounced).
|
||||
@@ -152,20 +153,5 @@ export class MdGridList implements OnInit, AfterContentChecked {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts values into strings. Falsy values become empty strings.
|
||||
* @internal
|
||||
*/
|
||||
export function coerceToString(value: string | number): string {
|
||||
return `${value || ''}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a value that might be a string into a number.
|
||||
* @internal
|
||||
*/
|
||||
export function coerceToNumber(value: string | number): number {
|
||||
return typeof value === 'string' ? parseInt(value, 10) : value;
|
||||
}
|
||||
|
||||
export const MD_GRID_LIST_DIRECTIVES: any[] = [MdGridList, MdGridTile, MdLine, MdGridTileText];
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
QueryList,
|
||||
AfterContentInit
|
||||
} from '@angular/core';
|
||||
import { coerceToNumber } from './grid-list';
|
||||
import { MdLine, MdLineSetter } from '@angular2-material/core/line/line';
|
||||
import {coerceToNumber} from './grid-list-measure';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
|
||||
+31
-5
@@ -1,11 +1,37 @@
|
||||
// RTL
|
||||
export * from './rtl/dir';
|
||||
export {Dir, LayoutDirection} from './rtl/dir';
|
||||
|
||||
// Portals
|
||||
export * from './portal/portal';
|
||||
export * from './portal/portal-directives';
|
||||
export {
|
||||
Portal,
|
||||
PortalHost,
|
||||
BasePortalHost,
|
||||
ComponentPortal,
|
||||
TemplatePortal
|
||||
} from './portal/portal';
|
||||
export {
|
||||
PortalHostDirective,
|
||||
TemplatePortalDirective,
|
||||
PORTAL_DIRECTIVES
|
||||
} from './portal/portal-directives';
|
||||
export {DomPortalHost} from './portal/dom-portal-host';
|
||||
|
||||
// Overlay
|
||||
export {Overlay, OVERLAY_CONTAINER_TOKEN, OVERLAY_PROVIDERS} from './overlay/overlay';
|
||||
export {OverlayRef} from './overlay/overlay-ref';
|
||||
export {OverlayState} from './overlay/overlay-state';
|
||||
export {
|
||||
ConnectedOverlayDirective,
|
||||
OverlayOrigin,
|
||||
OVERLAY_DIRECTIVES
|
||||
} from './overlay/overlay-directives';
|
||||
|
||||
// Gestures
|
||||
export * from './gestures/MdGestureConfig';
|
||||
export {MdGestureConfig} from './gestures/MdGestureConfig';
|
||||
|
||||
export * from './line/line';
|
||||
// a11y
|
||||
export {
|
||||
AriaLivePoliteness,
|
||||
MdLiveAnnouncer,
|
||||
LIVE_ANNOUNCER_ELEMENT_TOKEN
|
||||
} from './a11y/live-announcer';
|
||||
|
||||
@@ -98,9 +98,3 @@ export const OVERLAY_PROVIDERS = [
|
||||
OverlayPositionBuilder,
|
||||
Overlay,
|
||||
];
|
||||
|
||||
// Re-export overlay-related modules so they can be imported directly from here.
|
||||
export {OverlayState} from './overlay-state';
|
||||
export {OverlayRef} from './overlay-ref';
|
||||
export {createOverlayContainer} from './overlay-container';
|
||||
export {OVERLAY_DIRECTIVES, ConnectedOverlayDirective, OverlayOrigin} from './overlay-directives';
|
||||
|
||||
@@ -203,7 +203,3 @@ export abstract class BasePortalHost implements PortalHost {
|
||||
this._disposeFn = fn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export {PORTAL_DIRECTIVES, TemplatePortalDirective, PortalHostDirective} from './portal-directives';
|
||||
export {DomPortalHost} from './dom-portal-host';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {MdLiveAnnouncer} from '@angular2-material/core/live-announcer/live-announcer';
|
||||
import {MdLiveAnnouncer} from '@angular2-material/core/a11y/live-announcer';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
// that are consumed across multiple components (and thus shouldn't be scoped).
|
||||
|
||||
@import "core/overlay/overlay";
|
||||
@import "core/live-announcer/live-announcer";
|
||||
@import "core/a11y/live-announcer";
|
||||
|
||||
@@ -6,7 +6,7 @@ import {provide} from '@angular/core';
|
||||
import {Renderer} from '@angular/core';
|
||||
|
||||
import {OVERLAY_CONTAINER_TOKEN} from '@angular2-material/core/overlay/overlay';
|
||||
import {MdLiveAnnouncer} from '@angular2-material/core/live-announcer/live-announcer';
|
||||
import {MdLiveAnnouncer} from '@angular2-material/core/a11y/live-announcer';
|
||||
import {createOverlayContainer} from '@angular2-material/core/overlay/overlay-container';
|
||||
import {MdGestureConfig} from '@angular2-material/core/gestures/MdGestureConfig';
|
||||
import {MdIconRegistry} from '@angular2-material/icon/icon-registry';
|
||||
|
||||
@@ -11,14 +11,12 @@ import {
|
||||
OverlayState,
|
||||
OverlayOrigin,
|
||||
OVERLAY_PROVIDERS,
|
||||
OVERLAY_DIRECTIVES
|
||||
} from '@angular2-material/core/overlay/overlay';
|
||||
import {
|
||||
OVERLAY_DIRECTIVES,
|
||||
ComponentPortal,
|
||||
Portal,
|
||||
PORTAL_DIRECTIVES,
|
||||
TemplatePortalDirective
|
||||
} from '@angular2-material/core/portal/portal';
|
||||
} from '@angular2-material/core/core';
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {PortalHostDirective} from '@angular2-material/core/portal/portal-directives';
|
||||
import {TemplatePortalDirective} from '@angular2-material/core/portal/portal-directives';
|
||||
import {Portal} from '@angular2-material/core/portal/portal';
|
||||
import {ViewChildren} from '@angular/core';
|
||||
import {QueryList} from '@angular/core';
|
||||
import {ComponentPortal} from '@angular2-material/core/portal/portal';
|
||||
import {Component, ViewChildren, QueryList} from '@angular/core';
|
||||
import {
|
||||
Portal,
|
||||
ComponentPortal,
|
||||
TemplatePortalDirective,
|
||||
PortalHostDirective
|
||||
} from '@angular2-material/core/core';
|
||||
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
@import "core/overlay/overlay";
|
||||
@import "core/live-announcer/live-announcer";
|
||||
@import "core/a11y/live-announcer";
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {provide} from '@angular/core';
|
||||
import {Renderer} from '@angular/core';
|
||||
|
||||
import {OVERLAY_CONTAINER_TOKEN} from '@angular2-material/core/overlay/overlay';
|
||||
import {MdLiveAnnouncer} from '@angular2-material/core/live-announcer/live-announcer';
|
||||
import {MdLiveAnnouncer} from '@angular2-material/core/a11y/live-announcer';
|
||||
import {createOverlayContainer} from '@angular2-material/core/overlay/overlay-container';
|
||||
import {MdGestureConfig} from '@angular2-material/core/gestures/MdGestureConfig';
|
||||
import {MdIconRegistry} from '@angular2-material/icon/icon-registry';
|
||||
|
||||
Reference in New Issue
Block a user