From 336aab1d21cc0e0f106809f7584673a858190278 Mon Sep 17 00:00:00 2001 From: Yogesh Date: Mon, 9 Oct 2017 00:34:28 -0400 Subject: [PATCH 01/13] upgraded various versions --- CONTRIBUTING.MD | 3 + package.json | 111 ++++++++---------- .../accordion-panel.component.spec.ts | 4 +- src/app/accordion/accordion.component.spec.ts | 4 +- src/app/accordion/accordion.module.ts | 4 +- .../applications-menu.component.html | 10 +- .../applications-menu.component.spec.ts | 4 +- .../applications-menu.component.ts | 4 +- .../applications-search.component.html | 6 +- .../applications-search.component.spec.ts | 4 +- src/app/applications/applications.module.ts | 4 +- src/app/cbp-root/cbp-root.module.ts | 12 +- .../header/app-header/app-header.module.ts | 6 +- .../cbp-header/cbp-header.component.html | 4 +- .../header/cbp-header/cbp-header.module.ts | 14 +-- .../user/user-menu/user-menu.component.html | 14 +-- .../user-menu/user-menu.component.spec.ts | 4 +- src/app/user/user.module.ts | 6 +- .../demo-app-header.component.html | 10 +- .../demo-app-header.component.spec.ts | 4 +- .../demo-app-header/demo-app-header.module.ts | 4 +- .../demo-buttons/demo-buttons.component.html | 20 ++-- .../app/demo-buttons/demo-buttons.module.ts | 6 +- src/demo/app/demo.module.ts | 4 +- 24 files changed, 130 insertions(+), 136 deletions(-) diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD index 447fa24..bcb1867 100644 --- a/CONTRIBUTING.MD +++ b/CONTRIBUTING.MD @@ -3,6 +3,9 @@ Ensure angular-cli is as per [angular-cli](https://cli.angular.io/) which includes global npm install. Clone this repository. +Install all dependencies including `peerDependencies`. (Useful for installing peers https://www.npmjs.com/package/npm-install-peers) + + # Build Produces consumable artifacts as per [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview) diff --git a/package.json b/package.json index 012dcac..3bc5b6e 100644 --- a/package.json +++ b/package.json @@ -32,72 +32,59 @@ "postinstall": "node postinstall.js" }, "dependencies": { - "@angular/cdk": "^2.0.0-beta.10", - "@angular/flex-layout": "^2.0.0-beta.9", - "@angular/material": "^2.0.0-beta.10", - "cbp-theme": "^1.4.0", - "classlist.js": "^1.1.20150312", - "del": "^3.0.0", - "hammerjs": "^2.0.8", - "replace": "^0.3.0", - "web-animations-js": "^2.3.1" + "@angular/cdk": "2.0.0-beta.12", + "@angular/flex-layout": "2.0.0-beta.9", + "@angular/material": "2.0.0-beta.12", + "cbp-theme": "1.6.0", + "classlist.js": "1.1.20150312", + "del": "3.0.0", + "hammerjs": "2.0.8", + "replace": "0.3.0", + "web-animations-js": "2.3.1" }, "peerDependencies": { - "@angular/animations": "^4.4.0-RC.0", - "@angular/common": "^4.4.0-RC.0", - "@angular/compiler": "^4.4.0-RC.0", - "@angular/core": "^4.4.0-RC.0", - "@angular/forms": "^4.4.0-RC.0", - "@angular/http": "^4.4.0-RC.0", - "@angular/flex-layout": "^2.0.0-beta.9", - "@angular/material": "^2.0.0-beta.10", - "@angular/platform-browser": "^4.4.0-RC.0", - "@angular/platform-browser-dynamic": "^4.4.0-RC.0", - "@angular/router": "^4.4.0-RC.0", - "rxjs": "^5.4.3", - "zone.js": "^0.8.17" + "@angular/animations": "4.4.4", + "@angular/common": "4.4.4", + "@angular/compiler": "4.4.4", + "@angular/core": "4.4.4", + "@angular/forms": "4.4.4", + "@angular/http": "4.4.4", + "@angular/platform-browser": "4.4.4", + "@angular/platform-browser-dynamic": "4.4.4", + "@angular/router": "4.4.4", + "rxjs": "5.4.3", + "zone.js": "0.8.18" }, "devDependencies": { - "@angular/animations": "^4.4.0-RC.0", - "@angular/cli": "1.3.2", - "@angular/common": "^4.4.0-RC.0", - "@angular/compiler": "^4.4.0-RC.0", - "@angular/compiler-cli": "^4.4.0-RC.0", - "@angular/core": "^4.4.0-RC.0", - "@angular/flex-layout": "^2.0.0-beta.9", - "@angular/forms": "^4.4.0-RC.0", - "@angular/http": "^4.4.0-RC.0", - "@angular/language-service": "^4.4.0-RC.0", - "@angular/material": "^2.0.0-beta.10", - "@angular/platform-browser": "^4.4.0-RC.0", - "@angular/platform-browser-dynamic": "^4.4.0-RC.0", - "@angular/router": "^4.4.0-RC.0", - "@compodoc/compodoc": "^1.0.0-beta.15", - "@types/jasmine": "2.5.54", - "@types/jasminewd2": "^2.0.3", - "@types/node": "~8.0.26", - "codelyzer": "~3.1.2", - "concurrently": "^3.5.0", - "core-js": "^2.5.1", - "es6-shim": "^0.35.3", - "jasmine-core": "~2.8.0", - "jasmine-spec-reporter": "^4.2.1", - "karma": "~1.7.1", - "karma-chrome-launcher": "~2.2.0", - "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.3.0", - "karma-jasmine": "~1.1.0", - "karma-jasmine-html-reporter": "^0.2.2", - "ngx-library-builder": "^1.1.1", - "plugin-typescript": "^7.1.0", - "protractor": "^5.1.2", - "replace": "^0.3.0", - "standard-version": "^4.2.0", - "tota11y": "^0.1.6", - "ts-node": "~3.3.0", - "tslint": "~5.7.0", - "typescript": "~2.5.2", - "zone.js": "^0.8.17" + "@angular/cli": "1.4.5", + "@angular/compiler-cli": "4.4.4", + "@angular/language-service": "4.4.4", + "@compodoc/compodoc": "1.0.1", + "@types/jasmine": "2.6.0", + "@types/jasminewd2": "2.0.3", + "@types/node": "8.0.33", + "codelyzer": "3.2.1", + "concurrently": "3.5.0", + "core-js": "2.5.1", + "es6-shim": "0.35.3", + "jasmine-core": "2.8.0", + "jasmine-spec-reporter": "4.2.1", + "karma": "1.7.1", + "karma-chrome-launcher": "2.2.0", + "karma-cli": "1.0.1", + "karma-coverage-istanbul-reporter": "1.3.0", + "karma-jasmine": "1.1.0", + "karma-jasmine-html-reporter": "0.2.2", + "ngx-library-builder": "1.1.3", + "plugin-typescript": "7.1.0", + "protractor": "5.1.2", + "replace": "0.3.0", + "standard-version": "4.2.0", + "tota11y": "0.1.6", + "ts-node": "3.3.0", + "tslint": "5.7.0", + "typescript": "2.5.3", + "zone.js": "0.8.18" }, "engines": { "node": ">=8.0.0" diff --git a/src/app/accordion/accordion-panel.component.spec.ts b/src/app/accordion/accordion-panel.component.spec.ts index ed19eeb..200571d 100644 --- a/src/app/accordion/accordion-panel.component.spec.ts +++ b/src/app/accordion/accordion-panel.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CBPAccordionPanelComponent } from './accordion-panel.component'; -import {MdButtonModule} from '@angular/material'; +import {MatButtonModule} from '@angular/material'; import {CBPAccordionComponent} from './accordion.component'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; @@ -11,7 +11,7 @@ describe('CBPAccordionPanelComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdButtonModule, NoopAnimationsModule], + imports: [MatButtonModule, NoopAnimationsModule], declarations: [CBPAccordionPanelComponent], providers: [CBPAccordionComponent] }) diff --git a/src/app/accordion/accordion.component.spec.ts b/src/app/accordion/accordion.component.spec.ts index 14a9bf9..1b28947 100644 --- a/src/app/accordion/accordion.component.spec.ts +++ b/src/app/accordion/accordion.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CBPAccordionComponent } from './accordion.component'; -import { MdButtonModule } from '@angular/material'; +import { MatButtonModule } from '@angular/material'; describe('CBPAccordionComponent', () => { let component: CBPAccordionComponent; @@ -9,7 +9,7 @@ describe('CBPAccordionComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ MdButtonModule], + imports: [ MatButtonModule], declarations: [CBPAccordionComponent] }) .compileComponents(); diff --git a/src/app/accordion/accordion.module.ts b/src/app/accordion/accordion.module.ts index ef6fd35..aba0f46 100644 --- a/src/app/accordion/accordion.module.ts +++ b/src/app/accordion/accordion.module.ts @@ -2,11 +2,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {CBPAccordionComponent} from './accordion.component'; import {CBPAccordionPanelComponent} from './accordion-panel.component'; -import {MdButtonModule} from '@angular/material'; +import {MatButtonModule} from '@angular/material'; @NgModule({ imports: [ - CommonModule, MdButtonModule + CommonModule, MatButtonModule ], declarations: [CBPAccordionComponent, CBPAccordionPanelComponent], exports: [ diff --git a/src/app/applications/applications-menu/applications-menu.component.html b/src/app/applications/applications-menu/applications-menu.component.html index 810e529..146cf0e 100644 --- a/src/app/applications/applications-menu/applications-menu.component.html +++ b/src/app/applications/applications-menu/applications-menu.component.html @@ -1,4 +1,4 @@ -
+
@@ -8,9 +8,9 @@
- + - + @@ -18,7 +18,7 @@
Recent Apps
-
+
{{app.name}} @@ -56,7 +56,7 @@
{{applicationsData.currentApp.name}} - {{applicationsData.currentApp.version}} - +
diff --git a/src/app/applications/applications-menu/applications-menu.component.spec.ts b/src/app/applications/applications-menu/applications-menu.component.spec.ts index bb20b5a..985d374 100644 --- a/src/app/applications/applications-menu/applications-menu.component.spec.ts +++ b/src/app/applications/applications-menu/applications-menu.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CBPApplicationsMenuComponent } from './applications-menu.component'; -import {MdIconModule, MdMenuModule} from '@angular/material'; +import {MatIconModule, MatMenuModule} from '@angular/material'; import {CBPProgressModule} from '../../progress/progress.module'; import {CBPPipesModule} from '../../pipes/pipes.module'; import {FlexLayoutModule} from '@angular/flex-layout'; @@ -19,7 +19,7 @@ describe('CBPApplicationsMenuComponent', () => { beforeEach(async(() => { // const spiedAppService = jasmine.createSpy('mockAppService' , MockAppService); TestBed.configureTestingModule({ - imports: [MdMenuModule, MdIconModule, CBPProgressModule, CBPPipesModule, FlexLayoutModule, FormsModule, ReactiveFormsModule], + imports: [MatMenuModule, MatIconModule, CBPProgressModule, CBPPipesModule, FlexLayoutModule, FormsModule, ReactiveFormsModule], declarations: [ CBPApplicationsMenuComponent , CBPApplicationsSearchComponent], providers: [ {provide: CBP_APPLICATIONS_SERVICE, useClass: MockApplicationsService}, diff --git a/src/app/applications/applications-menu/applications-menu.component.ts b/src/app/applications/applications-menu/applications-menu.component.ts index 8fb6560..4d98000 100644 --- a/src/app/applications/applications-menu/applications-menu.component.ts +++ b/src/app/applications/applications-menu/applications-menu.component.ts @@ -1,7 +1,7 @@ import {ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {Subscription} from 'rxjs/Subscription'; import {MediaChange, ObservableMedia} from '@angular/flex-layout'; -import {MdMenuTrigger} from '@angular/material'; +import {MatMenuTrigger} from '@angular/material'; import { CBP_APPLICATIONS_SERVICE, CBPApplication, CBPApplicationsData, CBPApplicationsService @@ -26,7 +26,7 @@ export class CBPApplicationsMenuComponent implements OnInit, OnDestroy { private mediaSubscription: Subscription; - @ViewChild('cbpMenuTrigger') cbpMenuTrigger: MdMenuTrigger; + @ViewChild('cbpMenuTrigger') cbpMenuTrigger: MatMenuTrigger; public error: any; diff --git a/src/app/applications/applications-search/applications-search.component.html b/src/app/applications/applications-search/applications-search.component.html index 5e5da81..18b7643 100644 --- a/src/app/applications/applications-search/applications-search.component.html +++ b/src/app/applications/applications-search/applications-search.component.html @@ -1,8 +1,8 @@
diff --git a/src/app/applications/applications-search/applications-search.component.spec.ts b/src/app/applications/applications-search/applications-search.component.spec.ts index 794c634..83805ed 100644 --- a/src/app/applications/applications-search/applications-search.component.spec.ts +++ b/src/app/applications/applications-search/applications-search.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CBPApplicationsSearchComponent } from './applications-search.component'; -import {MdFormFieldModule, MdInputModule} from '@angular/material'; +import {MatFormFieldModule, MatInputModule} from '@angular/material'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {CBP_APPLICATIONS_SERVICE} from '../cbp-applications-service'; import {MockApplicationsService} from '../../../mock-services/applications.mock.service'; @@ -15,7 +15,7 @@ describe('CBPApplicationsSearchComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdFormFieldModule, MdInputModule, FormsModule, ReactiveFormsModule , NoopAnimationsModule], + imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule , NoopAnimationsModule], declarations: [ CBPApplicationsSearchComponent ], providers: [ {provide: CBP_APPLICATIONS_SERVICE, useClass: MockApplicationsService}, diff --git a/src/app/applications/applications.module.ts b/src/app/applications/applications.module.ts index 0962e4f..ee90aaf 100644 --- a/src/app/applications/applications.module.ts +++ b/src/app/applications/applications.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {CBPApplicationsMenuComponent} from './applications-menu/applications-menu.component'; -import {MdFormFieldModule, MdIconModule, MdInputModule, MdMenuModule} from '@angular/material'; +import {MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule} from '@angular/material'; import {CBPProgressModule} from '../progress/progress.module'; import {CBPPipesModule} from '../pipes/pipes.module'; import {FlexLayoutModule} from '@angular/flex-layout'; @@ -12,7 +12,7 @@ import { CBPApplicationsSearchComponent } from './applications-search/applicatio @NgModule({ imports: [ - CommonModule, MdMenuModule, MdIconModule, FlexLayoutModule, FormsModule, ReactiveFormsModule, MdInputModule, MdFormFieldModule, + CommonModule, MatMenuModule, MatIconModule, FlexLayoutModule, FormsModule, ReactiveFormsModule, MatInputModule, MatFormFieldModule, CBPProgressModule, CBPPipesModule ], declarations: [CBPApplicationsMenuComponent, CBPApplicationsSearchComponent], diff --git a/src/app/cbp-root/cbp-root.module.ts b/src/app/cbp-root/cbp-root.module.ts index 85c6b4b..36d98c8 100644 --- a/src/app/cbp-root/cbp-root.module.ts +++ b/src/app/cbp-root/cbp-root.module.ts @@ -1,7 +1,10 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { CBPRootComponent } from './cbp-root.component'; -import {MdButtonModule, MdFormFieldModule, MdIconModule, MdIconRegistry, MdInputModule} from '@angular/material'; +import { + MATERIAL_COMPATIBILITY_MODE, MatButtonModule, MatFormFieldModule, MatIconModule, MatIconRegistry, + MatInputModule +} from '@angular/material'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FlexLayoutModule } from '@angular/flex-layout'; import {CBPProgressModule} from '../progress/progress.module'; @@ -12,16 +15,17 @@ import {FormsModule} from '@angular/forms'; @NgModule({ imports: [ - CommonModule, MdIconModule, BrowserAnimationsModule, FlexLayoutModule, MdButtonModule, MdInputModule, MdFormFieldModule, FormsModule + CommonModule, MatIconModule, BrowserAnimationsModule, FlexLayoutModule, MatButtonModule, MatInputModule, MatFormFieldModule, FormsModule ], declarations: [CBPRootComponent], + providers: [{provide: MATERIAL_COMPATIBILITY_MODE, useValue: true}], exports: [ - MdIconModule, BrowserAnimationsModule, FlexLayoutModule, MdButtonModule, MdInputModule, MdFormFieldModule, FormsModule, + MatIconModule, BrowserAnimationsModule, FlexLayoutModule, MatButtonModule, MatInputModule, MatFormFieldModule, FormsModule, CBPRootComponent, CBPProgressModule, CBPHeaderModule, CBPPipesModule ] }) export class CBPRootModule { - constructor(mdIconRegistry: MdIconRegistry) { + constructor(mdIconRegistry: MatIconRegistry) { mdIconRegistry.registerFontClassAlias('fontawesome', 'fa'); } } diff --git a/src/app/header/app-header/app-header.module.ts b/src/app/header/app-header/app-header.module.ts index da276ab..cd80573 100644 --- a/src/app/header/app-header/app-header.module.ts +++ b/src/app/header/app-header/app-header.module.ts @@ -2,8 +2,8 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {CBPAppHeaderComponent} from './app-header.component'; import { - MdButtonModule, MdIconModule, MdListModule, MdMenuModule, MdTabsModule, - MdToolbarModule + MatButtonModule, MatIconModule, MatListModule, MatMenuModule, MatTabsModule, + MatToolbarModule } from '@angular/material'; import {FlexLayoutModule} from '@angular/flex-layout'; import { CBPAppTitleComponent } from './app-title/app-title.component'; @@ -14,7 +14,7 @@ import {CBPToolbarModule} from '../cbp-toolbar/cbp-toolbar.module'; @NgModule({ imports: [ - CommonModule, MdTabsModule, MdListModule, MdMenuModule, MdToolbarModule, FlexLayoutModule, MdButtonModule, MdIconModule, + CommonModule, MatTabsModule, MatListModule, MatMenuModule, MatToolbarModule, FlexLayoutModule, MatButtonModule, MatIconModule, CBPToolbarModule ], declarations: [CBPAppHeaderComponent, CBPAppTitleComponent, CBPAppMainNavComponent, CBPAppRightNavComponent], diff --git a/src/app/header/cbp-header/cbp-header.component.html b/src/app/header/cbp-header/cbp-header.component.html index 90e3ac9..2a3b79a 100644 --- a/src/app/header/cbp-header/cbp-header.component.html +++ b/src/app/header/cbp-header/cbp-header.component.html @@ -35,5 +35,5 @@

U.S. Customs & Border Protect - - \ No newline at end of file + + \ No newline at end of file diff --git a/src/app/header/cbp-header/cbp-header.module.ts b/src/app/header/cbp-header/cbp-header.module.ts index 1ae02ef..8982962 100644 --- a/src/app/header/cbp-header/cbp-header.module.ts +++ b/src/app/header/cbp-header/cbp-header.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {CBPHeaderComponent} from './cbp-header.component'; -import {MdIconModule, MdListModule, MdMenuModule, MdToolbarModule, MdButtonModule} from '@angular/material'; +import {MatIconModule, MatListModule, MatMenuModule, MatToolbarModule, MatButtonModule} from '@angular/material'; import {FlexLayoutModule} from '@angular/flex-layout'; import {CBPUserModule} from '../../user/user.module'; import {CBPApplicationsModule} from '../../applications/applications.module'; @@ -11,17 +11,17 @@ import {CBPToolbarModule} from '../cbp-toolbar/cbp-toolbar.module'; @NgModule({ imports: [ CommonModule, - MdListModule, - MdMenuModule, - MdToolbarModule, + MatListModule, + MatMenuModule, + MatToolbarModule, FlexLayoutModule, - MdIconModule, - MdButtonModule, + MatIconModule, + MatButtonModule, CBPUserModule, CBPApplicationsModule, CBPToolbarModule ], declarations: [CBPHeaderComponent], - exports: [CBPHeaderComponent, MdButtonModule, CBPUserModule, CBPApplicationsModule, CBPToolbarModule] + exports: [CBPHeaderComponent, MatButtonModule, CBPUserModule, CBPApplicationsModule, CBPToolbarModule] }) export class CBPHeaderModule { } diff --git a/src/app/user/user-menu/user-menu.component.html b/src/app/user/user-menu/user-menu.component.html index 0c98a12..e3b37be 100644 --- a/src/app/user/user-menu/user-menu.component.html +++ b/src/app/user/user-menu/user-menu.component.html @@ -4,25 +4,25 @@
-
- +
+ {{user.firstName}} {{user.lastName}} - +
- + {{user.firstName}} {{user.lastName}} - +
- + - +
Logout
diff --git a/src/app/user/user-menu/user-menu.component.spec.ts b/src/app/user/user-menu/user-menu.component.spec.ts index b3ab8c2..b1a0167 100644 --- a/src/app/user/user-menu/user-menu.component.spec.ts +++ b/src/app/user/user-menu/user-menu.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CBPUserMenuComponent } from './user-menu.component'; -import {MdIconModule, MdMenuModule} from '@angular/material'; +import {MatIconModule, MatMenuModule} from '@angular/material'; import {CBPProgressModule} from '../../progress/progress.module'; import {CBP_USER_SERVICE} from '../user'; import {MockUserService} from '../../../mock-services/user.mock.service'; @@ -13,7 +13,7 @@ describe('CBPUserMenuComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ CBPUserMenuComponent ], - imports: [MdIconModule, MdMenuModule, CBPProgressModule], + imports: [MatIconModule, MatMenuModule, CBPProgressModule], providers: [{provide: CBP_USER_SERVICE, useClass: MockUserService}] }) .compileComponents(); diff --git a/src/app/user/user.module.ts b/src/app/user/user.module.ts index efe0ddb..7a012d4 100644 --- a/src/app/user/user.module.ts +++ b/src/app/user/user.module.ts @@ -1,15 +1,15 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { CBPUserMenuComponent } from './user-menu/user-menu.component'; -import {MdButtonModule, MdIconModule, MdListModule, MdMenuModule} from '@angular/material'; +import {MatButtonModule, MatIconModule, MatListModule, MatMenuModule} from '@angular/material'; import {FlexLayoutModule} from '@angular/flex-layout'; import {CBPProgressModule} from '../progress/progress.module'; @NgModule({ imports: [ - CommonModule, MdListModule, MdMenuModule, FlexLayoutModule, MdIconModule, MdButtonModule, CBPProgressModule + CommonModule, MatListModule, MatMenuModule, FlexLayoutModule, MatIconModule, MatButtonModule, CBPProgressModule ], - exports: [CBPUserMenuComponent, MdMenuModule], + exports: [CBPUserMenuComponent, MatMenuModule], declarations: [CBPUserMenuComponent] }) export class CBPUserModule { } diff --git a/src/demo/app/demo-app-header/demo-app-header.component.html b/src/demo/app/demo-app-header/demo-app-header.component.html index 7279cb7..b59fc74 100644 --- a/src/demo/app/demo-app-header/demo-app-header.component.html +++ b/src/demo/app/demo-app-header/demo-app-header.component.html @@ -15,19 +15,19 @@

- +
- +
- - - + + + diff --git a/src/demo/app/demo-app-header/demo-app-header.component.spec.ts b/src/demo/app/demo-app-header/demo-app-header.component.spec.ts index 6315b9b..b7d16c4 100644 --- a/src/demo/app/demo-app-header/demo-app-header.component.spec.ts +++ b/src/demo/app/demo-app-header/demo-app-header.component.spec.ts @@ -3,7 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { DemoAppHeaderComponent } from './demo-app-header.component'; import {CommonModule} from '@angular/common'; import {CBPAppHeaderModule} from '../../../app/header/app-header/app-header.module'; -import {MdIconModule, MdTabsModule} from '@angular/material'; +import {MatIconModule, MatTabsModule} from '@angular/material'; import {FlexLayoutModule} from '@angular/flex-layout'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; @@ -13,7 +13,7 @@ describe('DemoAppHeaderComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ CommonModule, CBPAppHeaderModule, MdIconModule, MdTabsModule, FlexLayoutModule, NoopAnimationsModule], + imports: [ CommonModule, CBPAppHeaderModule, MatIconModule, MatTabsModule, FlexLayoutModule, NoopAnimationsModule], declarations: [ DemoAppHeaderComponent] }) .compileComponents(); diff --git a/src/demo/app/demo-app-header/demo-app-header.module.ts b/src/demo/app/demo-app-header/demo-app-header.module.ts index 17bd9a3..8904d77 100644 --- a/src/demo/app/demo-app-header/demo-app-header.module.ts +++ b/src/demo/app/demo-app-header/demo-app-header.module.ts @@ -2,12 +2,12 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { DemoAppHeaderComponent } from './demo-app-header.component'; import {CBPAppHeaderModule} from '../../../app/header/app-header/app-header.module'; -import {MdIconModule, MdTabsModule} from '@angular/material'; +import {MatIconModule, MatTabsModule} from '@angular/material'; import {FlexLayoutModule} from '@angular/flex-layout'; @NgModule({ imports: [ - CommonModule, CBPAppHeaderModule, MdIconModule, MdTabsModule, FlexLayoutModule + CommonModule, CBPAppHeaderModule, MatIconModule, MatTabsModule, FlexLayoutModule ], declarations: [DemoAppHeaderComponent], exports: [DemoAppHeaderComponent] diff --git a/src/demo/app/demo-buttons/demo-buttons.component.html b/src/demo/app/demo-buttons/demo-buttons.component.html index 243e157..5999240 100644 --- a/src/demo/app/demo-buttons/demo-buttons.component.html +++ b/src/demo/app/demo-buttons/demo-buttons.component.html @@ -1,15 +1,15 @@

Buttons

- - - - -SomeLink + + + + +SomeLink

Disabled Buttons

- - - - -SomeLink \ No newline at end of file + + + + +SomeLink \ No newline at end of file diff --git a/src/demo/app/demo-buttons/demo-buttons.module.ts b/src/demo/app/demo-buttons/demo-buttons.module.ts index cb6d460..879a994 100644 --- a/src/demo/app/demo-buttons/demo-buttons.module.ts +++ b/src/demo/app/demo-buttons/demo-buttons.module.ts @@ -1,13 +1,13 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {DemoButtonsComponent} from './demo-buttons.component'; -import {MdButtonModule} from '@angular/material'; +import {MatButtonModule} from '@angular/material'; @NgModule({ imports: [ - CommonModule, MdButtonModule + CommonModule, MatButtonModule ], - exports: [DemoButtonsComponent, MdButtonModule], + exports: [DemoButtonsComponent, MatButtonModule], declarations: [DemoButtonsComponent] }) export class DemoButtonsModule { } diff --git a/src/demo/app/demo.module.ts b/src/demo/app/demo.module.ts index 2fd2ee1..9ebb841 100644 --- a/src/demo/app/demo.module.ts +++ b/src/demo/app/demo.module.ts @@ -8,7 +8,7 @@ import { DemoAppRoutingModule } from './demo-routing.module'; import { DemoAppComponent } from './demo.component'; import { MockUserService} from '../../mock-services/user.mock.service'; -import {MdIconModule, MdTabsModule} from '@angular/material'; +import {MatIconModule, MatTabsModule} from '@angular/material'; import {DemoCBPAccordionComponent} from './demo-cbp-accordion/demo-cbp-accordion.component'; import {DemoTypographyComponent} from './demo-typograqphy/demo-typography.component'; @@ -29,7 +29,7 @@ import {CBP_APPLICATIONS_SERVICE, CBPApplication} from '../../app/applications/c ], imports: [ BrowserModule, HttpClientModule, - MdTabsModule, MdIconModule, // MdTabsModule is used only for demo cbp-app-header + MatTabsModule, MatIconModule, // MdTabsModule is used only for demo cbp-app-header DemoAppRoutingModule, CBPRootModule, CBPAccordionModule, From 891274cd1a1fc79f2a76c22fb0cd7587ce5a8b57 Mon Sep 17 00:00:00 2001 From: Yogesh Date: Mon, 9 Oct 2017 01:38:20 -0400 Subject: [PATCH 02/13] upgraded various versions --- .angular-cli.json | 4 ++ package.json | 2 + .../cbp-header/cbp-header.component.spec.ts | 4 +- src/app/test-entry.ts | 32 ++++++++++++ src/app/test.ts | 52 +++++++++++++++++++ src/app/tsconfig.app.json | 33 ++++++++++++ src/app/tsconfig.spec.json | 26 ++++++++++ src/demo/tsconfig.spec.json | 2 +- src/test.ts | 1 + 9 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 src/app/test-entry.ts create mode 100644 src/app/test.ts create mode 100644 src/app/tsconfig.app.json create mode 100644 src/app/tsconfig.spec.json diff --git a/.angular-cli.json b/.angular-cli.json index e6ebe03..fb9fecc 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -8,6 +8,8 @@ "root": "src", "main": "app/index.ts", "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", "prefix": "cbp", "outDir": "dist-lib", "polyfills": "polyfills.ts", @@ -20,6 +22,8 @@ "root": "src/demo", "main": "index.ts", "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "../tsconfig.spec.json", "prefix": "demo", "outDir": "dist-demo", "index": "index.html", diff --git a/package.json b/package.json index 3bc5b6e..eb5569b 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,8 @@ "start:demo": "ng serve --app demo --port 4100", "build:demo": "ng build --app demo", "test": "ng test --app demo", + "test:demo": "ng test --app demo", + "test:lib": "ng test --app lib", "e2e:demo": "ng e2e --app demo --watch=false", "ci": "concurrently --kill-others-on-fail --names \"BUILD,LINTING,KARMA-UNIT,E2E-DEMO\" -c \"bgBlue.bold,bgCyan.bold,bgGreen.bold\" \"npm run build:lib\" \"npm run lint\" \"npm run test:once\" \"npm run e2e:demo\"", "test:once": "ng test --app demo --watch=false", diff --git a/src/app/header/cbp-header/cbp-header.component.spec.ts b/src/app/header/cbp-header/cbp-header.component.spec.ts index 8a42482..9269558 100644 --- a/src/app/header/cbp-header/cbp-header.component.spec.ts +++ b/src/app/header/cbp-header/cbp-header.component.spec.ts @@ -55,6 +55,8 @@ export class TestUserService implements CBPUserService { logout() {} } export class TestApplicationsService implements CBPApplicationsService { + registerCurrentApplication(currentApplication: CBPApplication): void { + } removeRecentApplication(recentApplication: CBPApplication): Observable { return null; } @@ -77,7 +79,7 @@ export class TestApplicationsService implements CBPApplicationsService { return null; } - search(token: string): Observable { + search(token: string): CBPApplication[] { return null; } diff --git a/src/app/test-entry.ts b/src/app/test-entry.ts new file mode 100644 index 0000000..04b2899 --- /dev/null +++ b/src/app/test-entry.ts @@ -0,0 +1,32 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import {CBPRootModule} from './cbp-root/cbp-root.module'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import {CBPAccordionModule} from './accordion/accordion.module'; +import {CBPHeaderModule} from './header/cbp-header/cbp-header.module'; +import {CBPAppHeaderModule} from './header/app-header/app-header.module'; +import {CBPProgressModule} from './progress/progress.module'; +import {CBPHeaderComponent} from './header/cbp-header/cbp-header.component'; +import {CBPRootComponent} from './cbp-root/cbp-root.component'; + +@NgModule({ + imports: [ + BrowserModule, + CBPRootModule, + CBPAccordionModule, + CBPHeaderModule, + CBPAppHeaderModule, + CBPProgressModule + ], + providers: [], + schemas: [], + bootstrap: [CBPRootComponent] +}) +export class TestEntryModule { + constructor() {} +} + + + +platformBrowserDynamic().bootstrapModule(TestEntryModule); +export * from './index'; diff --git a/src/app/test.ts b/src/app/test.ts new file mode 100644 index 0000000..1d20a44 --- /dev/null +++ b/src/app/test.ts @@ -0,0 +1,52 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files +import { NgModule } from '@angular/core'; + +import 'zone.js/dist/long-stack-trace-zone'; +import 'zone.js/dist/proxy.js'; +import 'zone.js/dist/sync-test'; +import 'zone.js/dist/jasmine-patch'; +import 'zone.js/dist/async-test'; +import 'zone.js/dist/fake-async-test'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; +import {CBPRootComponent} from './cbp-root/cbp-root.component'; +import {CBPProgressModule} from './progress/progress.module'; +import {CBPRootModule} from './cbp-root/cbp-root.module'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +@NgModule({ + imports: [ + CBPRootModule, + CBPProgressModule + ], + providers: [], + schemas: [], + bootstrap: [CBPRootComponent] +}) +export class TestEntryModule { + constructor() {} +} +platformBrowserDynamic().bootstrapModule(TestEntryModule); + +// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. +declare const __karma__: any; +declare const require: any; + +// Prevent Karma from running prematurely. +__karma__.loaded = function () {}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +console.log(context); +// And load the modules. +context.keys().map(context); +// Finally, start Karma to run the tests. +__karma__.start(); diff --git a/src/app/tsconfig.app.json b/src/app/tsconfig.app.json new file mode 100644 index 0000000..d27e287 --- /dev/null +++ b/src/app/tsconfig.app.json @@ -0,0 +1,33 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "declaration": true, + "module": "es2015", + "target": "es5", + "baseUrl": ".", + "stripInternal": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "outDir": "../build-lib", + "rootDir": ".", + "lib": [ + "es2015", + "dom" + ], + "skipLibCheck": true, + "types": [] + }, + "angularCompilerOptions": { + "annotateForClosureCompiler": true, + "strictMetadataEmit": true, + "skipTemplateCodegen": true, + "flatModuleOutFile": "ngx-cbp-theme.js", + "flatModuleId": "ngx-cbp-theme" + }, + "files": [ + "./index.ts", + "./typings.d.ts" + ] + +} diff --git a/src/app/tsconfig.spec.json b/src/app/tsconfig.spec.json new file mode 100644 index 0000000..b0d3778 --- /dev/null +++ b/src/app/tsconfig.spec.json @@ -0,0 +1,26 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + + "emitDecoratorMetadata": true, + "module": "commonjs", + "baseUrl": "./", + "rootDir": ".", + "outDir": "../build-lib", + "declaration" : false, + "types": [ + "node", + "jasmine" + ], + "typeRoots": [ + "node_modules/@types" + ], + "files": [ + "test-entry.ts", "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] + } +} diff --git a/src/demo/tsconfig.spec.json b/src/demo/tsconfig.spec.json index fb6d490..4220747 100644 --- a/src/demo/tsconfig.spec.json +++ b/src/demo/tsconfig.spec.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../../tsconfig.json", "compilerOptions": { "emitDecoratorMetadata": true, diff --git a/src/test.ts b/src/test.ts index cd612ee..4c59748 100644 --- a/src/test.ts +++ b/src/test.ts @@ -26,6 +26,7 @@ getTestBed().initTestEnvironment( ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); +console.log(context); // And load the modules. context.keys().map(context); // Finally, start Karma to run the tests. From c5f5fc03fbc755de0e48e770c31984d3cd9bf578 Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 12:23:16 -0400 Subject: [PATCH 03/13] app now needs separate tests with this upgraded version of angular-cli --- src/app/test-entry.ts | 30 ++++-------------------------- src/app/test-module.ts | 26 ++++++++++++++++++++++++++ src/app/test.ts | 18 +----------------- src/app/tsconfig.app.json | 2 +- src/app/tsconfig.spec.json | 3 ++- 5 files changed, 34 insertions(+), 45 deletions(-) create mode 100644 src/app/test-module.ts diff --git a/src/app/test-entry.ts b/src/app/test-entry.ts index 04b2899..3e36a7a 100644 --- a/src/app/test-entry.ts +++ b/src/app/test-entry.ts @@ -1,32 +1,10 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import {CBPRootModule} from './cbp-root/cbp-root.module'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import {CBPAccordionModule} from './accordion/accordion.module'; -import {CBPHeaderModule} from './header/cbp-header/cbp-header.module'; -import {CBPAppHeaderModule} from './header/app-header/app-header.module'; -import {CBPProgressModule} from './progress/progress.module'; -import {CBPHeaderComponent} from './header/cbp-header/cbp-header.component'; -import {CBPRootComponent} from './cbp-root/cbp-root.component'; +import {TestEntryModule} from './test-module'; -@NgModule({ - imports: [ - BrowserModule, - CBPRootModule, - CBPAccordionModule, - CBPHeaderModule, - CBPAppHeaderModule, - CBPProgressModule - ], - providers: [], - schemas: [], - bootstrap: [CBPRootComponent] -}) -export class TestEntryModule { - constructor() {} -} + +export * from './index'; platformBrowserDynamic().bootstrapModule(TestEntryModule); -export * from './index'; + diff --git a/src/app/test-module.ts b/src/app/test-module.ts new file mode 100644 index 0000000..44b4308 --- /dev/null +++ b/src/app/test-module.ts @@ -0,0 +1,26 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import {CBPRootModule} from './cbp-root/cbp-root.module'; +import {CBPAccordionModule} from './accordion/accordion.module'; +import {CBPHeaderModule} from './header/cbp-header/cbp-header.module'; +import {CBPAppHeaderModule} from './header/app-header/app-header.module'; +import {CBPProgressModule} from './progress/progress.module'; +import {CBPRootComponent} from './cbp-root/cbp-root.component'; + + +@NgModule({ + imports: [ + BrowserModule, + CBPRootModule, + CBPAccordionModule, + CBPHeaderModule, + CBPAppHeaderModule, + CBPProgressModule + ], + providers: [], + schemas: [], + bootstrap: [CBPRootComponent] +}) +export class TestEntryModule { + constructor() {} +} \ No newline at end of file diff --git a/src/app/test.ts b/src/app/test.ts index 1d20a44..befd9bf 100644 --- a/src/app/test.ts +++ b/src/app/test.ts @@ -12,24 +12,8 @@ import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -import {CBPRootComponent} from './cbp-root/cbp-root.component'; -import {CBPProgressModule} from './progress/progress.module'; -import {CBPRootModule} from './cbp-root/cbp-root.module'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -@NgModule({ - imports: [ - CBPRootModule, - CBPProgressModule - ], - providers: [], - schemas: [], - bootstrap: [CBPRootComponent] -}) -export class TestEntryModule { - constructor() {} -} -platformBrowserDynamic().bootstrapModule(TestEntryModule); + // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. declare const __karma__: any; diff --git a/src/app/tsconfig.app.json b/src/app/tsconfig.app.json index d27e287..546a217 100644 --- a/src/app/tsconfig.app.json +++ b/src/app/tsconfig.app.json @@ -26,7 +26,7 @@ "flatModuleId": "ngx-cbp-theme" }, "files": [ - "./index.ts", + "./test-entry.ts", "./typings.d.ts" ] diff --git a/src/app/tsconfig.spec.json b/src/app/tsconfig.spec.json index b0d3778..b5cb640 100644 --- a/src/app/tsconfig.spec.json +++ b/src/app/tsconfig.spec.json @@ -16,7 +16,8 @@ "node_modules/@types" ], "files": [ - "test-entry.ts", "test.ts" + "./test-entry.ts", + "./test.ts" ], "include": [ "**/*.spec.ts", From 64e13cca07118f2b3122b40c242293207de44664 Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 12:23:57 -0400 Subject: [PATCH 04/13] use same polyfill from the parent dir --- src/demo/polyfills.ts | 72 ------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/demo/polyfills.ts diff --git a/src/demo/polyfills.ts b/src/demo/polyfills.ts deleted file mode 100644 index 4348872..0000000 --- a/src/demo/polyfills.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -import 'core-js/es6/symbol'; -import 'core-js/es6/object'; -import 'core-js/es6/function'; -import 'core-js/es6/parse-int'; -import 'core-js/es6/parse-float'; -import 'core-js/es6/number'; -import 'core-js/es6/math'; -import 'core-js/es6/string'; -import 'core-js/es6/date'; -import 'core-js/es6/array'; -import 'core-js/es6/regexp'; -import 'core-js/es6/map'; -import 'core-js/es6/weak-map'; -import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; - - -/** - * Required to support Web Animations `@angular/animation`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - - -/*************************************************************************************************** - * Zone JS is required by Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ -// import 'intl/locale-data/jsonp/en'; From c75e291d9754e4cdf59bb4d6e9ed0cf98192fb6a Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 12:30:48 -0400 Subject: [PATCH 05/13] tests for lin and demo got separated (owing to angular-cli which supports multi-app) --- .angular-cli.json | 10 +++++----- package.json | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.angular-cli.json b/.angular-cli.json index fb9fecc..06f7583 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -5,14 +5,14 @@ }, "apps": [{ "name": "lib", - "root": "src", - "main": "app/index.ts", + "root": "src/app", + "main": "test-entry.ts", "test": "test.ts", "tsconfig": "tsconfig.app.json", "testTsconfig": "tsconfig.spec.json", "prefix": "cbp", "outDir": "dist-lib", - "polyfills": "polyfills.ts", + "polyfills": "../polyfills.ts", "styles": [ "ngx-cbp-theme.scss" ] @@ -23,11 +23,11 @@ "main": "index.ts", "test": "test.ts", "tsconfig": "tsconfig.app.json", - "testTsconfig": "../tsconfig.spec.json", + "testTsconfig": "tsconfig.spec.json", "prefix": "demo", "outDir": "dist-demo", "index": "index.html", - "polyfills": "polyfills.ts", + "polyfills": "../polyfills.ts", "styles": [ "demo.scss" ], diff --git a/package.json b/package.json index eb5569b..2fdcdb0 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,13 @@ "lint": "ng lint", "start:demo": "ng serve --app demo --port 4100", "build:demo": "ng build --app demo", - "test": "ng test --app demo", "test:demo": "ng test --app demo", + "test:demo:once": "ng test --app demo --watch=false", "test:lib": "ng test --app lib", + "test:lib:once": "ng test --app lib --watch=false", "e2e:demo": "ng e2e --app demo --watch=false", "ci": "concurrently --kill-others-on-fail --names \"BUILD,LINTING,KARMA-UNIT,E2E-DEMO\" -c \"bgBlue.bold,bgCyan.bold,bgGreen.bold\" \"npm run build:lib\" \"npm run lint\" \"npm run test:once\" \"npm run e2e:demo\"", - "test:once": "ng test --app demo --watch=false", + "test:once": "concurrently --kill-others-on-fail --names \"KARMA-LIB,KARMA-DEMO\" -c \"bgBlue.bold,bgGreen.bold\" \"npm run test:lib:once\" \"npm run test:demo:once\"", "postinstall": "node postinstall.js" }, "dependencies": { From 088cc8134e941a984402d5cce44606cecb95f48c Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 14:20:18 -0400 Subject: [PATCH 06/13] lint problem in test-module --- src/app/test-module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/test-module.ts b/src/app/test-module.ts index 44b4308..62cc7dd 100644 --- a/src/app/test-module.ts +++ b/src/app/test-module.ts @@ -23,4 +23,4 @@ import {CBPRootComponent} from './cbp-root/cbp-root.component'; }) export class TestEntryModule { constructor() {} -} \ No newline at end of file +} From 157a821e2d26b99d2be8ff96b39e2880f2ad4f75 Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 14:23:34 -0400 Subject: [PATCH 07/13] angular-cli version 1.4.5 --- README.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.MD b/README.MD index 0b3e8bd..1fc7b15 100644 --- a/README.MD +++ b/README.MD @@ -45,6 +45,8 @@ ___ ## Getting Started - How To Use Note: For Windows users we recommend git-bash shell. Also check the node engine version. + +Use angular-cli version 1.4.5 * Install [angular-cli](https://cli.angular.io/) globally making sure we use same version as we have in `@angular/cli` inside package.json. * For new apps follow [angular-cli](https://cli.angular.io/) and create your application with styles = SCSS. Minimal e.g. From 3b90c49405459ba9f8c684edb5257956ef6995de Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 14:31:47 -0400 Subject: [PATCH 08/13] npm install peers --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9b89a5d..f362203 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ node_js: - 8 install: - npm install + - npm install npm-install-peers + - ./node_modules/.bin/npm-install-peers before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start From a26cf9dc52da93ff8d6c06a3253d4cb20fabd0ee Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 14:38:36 -0400 Subject: [PATCH 09/13] install peers in sh -e --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f362203..03b3328 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: install: - npm install - npm install npm-install-peers - - ./node_modules/.bin/npm-install-peers + - sh -e ./node_modules/.bin/npm-install-peers before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start From 4d6ea86f88384701a4f1d37b5d31a2471f51af39 Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 14:43:34 -0400 Subject: [PATCH 10/13] travis fix - performing a global install for peers --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 03b3328..748b14b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ node_js: - 8 install: - npm install - - npm install npm-install-peers - - sh -e ./node_modules/.bin/npm-install-peers + - npm install npm-install-peers -g + - npm-install-peers before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start From 19cbea1c70a710ae77037869815ed6b5bff672d5 Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 14:57:10 -0400 Subject: [PATCH 11/13] copied peer dependencies to devDependencies as this does not work well for @angular org --- .travis.yml | 2 -- CONTRIBUTING.MD | 3 --- package.json | 11 +++++++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 748b14b..9b89a5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,6 @@ node_js: - 8 install: - npm install - - npm install npm-install-peers -g - - npm-install-peers before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD index bcb1867..447fa24 100644 --- a/CONTRIBUTING.MD +++ b/CONTRIBUTING.MD @@ -3,9 +3,6 @@ Ensure angular-cli is as per [angular-cli](https://cli.angular.io/) which includes global npm install. Clone this repository. -Install all dependencies including `peerDependencies`. (Useful for installing peers https://www.npmjs.com/package/npm-install-peers) - - # Build Produces consumable artifacts as per [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview) diff --git a/package.json b/package.json index 2fdcdb0..fc6de29 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,17 @@ "ts-node": "3.3.0", "tslint": "5.7.0", "typescript": "2.5.3", + "zone.js": "0.8.18", + "@angular/animations": "4.4.4", + "@angular/common": "4.4.4", + "@angular/compiler": "4.4.4", + "@angular/core": "4.4.4", + "@angular/forms": "4.4.4", + "@angular/http": "4.4.4", + "@angular/platform-browser": "4.4.4", + "@angular/platform-browser-dynamic": "4.4.4", + "@angular/router": "4.4.4", + "rxjs": "5.4.3", "zone.js": "0.8.18" }, "engines": { From fa37e3390041d607c9d21b1a394f850fe7036b3b Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 15:12:54 -0400 Subject: [PATCH 12/13] package devDepndencies sorted --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index fc6de29..8620647 100644 --- a/package.json +++ b/package.json @@ -97,8 +97,7 @@ "@angular/platform-browser": "4.4.4", "@angular/platform-browser-dynamic": "4.4.4", "@angular/router": "4.4.4", - "rxjs": "5.4.3", - "zone.js": "0.8.18" + "rxjs": "5.4.3" }, "engines": { "node": ">=8.0.0" From 330db67b57a8cc8eb1ef09abda15833967b43733 Mon Sep 17 00:00:00 2001 From: yogeshgadge Date: Tue, 10 Oct 2017 15:35:07 -0400 Subject: [PATCH 13/13] starting parallel chrome unit tests on travis for "concurrently" using simple npm-run-all --- .travis.yml | 2 +- package.json | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b89a5d..aebd6fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ before_script: jobs: include: - stage: build & linting & test - script: npm run ci + script: npm run ready - stage : publish script: echo "Publishing to Github..." script: npm run build:demo diff --git a/package.json b/package.json index 8620647..446bc8a 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "test:lib": "ng test --app lib", "test:lib:once": "ng test --app lib --watch=false", "e2e:demo": "ng e2e --app demo --watch=false", - "ci": "concurrently --kill-others-on-fail --names \"BUILD,LINTING,KARMA-UNIT,E2E-DEMO\" -c \"bgBlue.bold,bgCyan.bold,bgGreen.bold\" \"npm run build:lib\" \"npm run lint\" \"npm run test:once\" \"npm run e2e:demo\"", - "test:once": "concurrently --kill-others-on-fail --names \"KARMA-LIB,KARMA-DEMO\" -c \"bgBlue.bold,bgGreen.bold\" \"npm run test:lib:once\" \"npm run test:demo:once\"", + "ready": "npm-run-all --parallel build:lib lint test:once e2e:demo", + "test:once": "npm-run-all --serial test:lib:once test:demo:once", "postinstall": "node postinstall.js" }, "dependencies": { @@ -59,15 +59,23 @@ "zone.js": "0.8.18" }, "devDependencies": { + "@angular/animations": "4.4.4", "@angular/cli": "1.4.5", + "@angular/common": "4.4.4", + "@angular/compiler": "4.4.4", "@angular/compiler-cli": "4.4.4", + "@angular/core": "4.4.4", + "@angular/forms": "4.4.4", + "@angular/http": "4.4.4", "@angular/language-service": "4.4.4", + "@angular/platform-browser": "4.4.4", + "@angular/platform-browser-dynamic": "4.4.4", + "@angular/router": "4.4.4", "@compodoc/compodoc": "1.0.1", "@types/jasmine": "2.6.0", "@types/jasminewd2": "2.0.3", "@types/node": "8.0.33", "codelyzer": "3.2.1", - "concurrently": "3.5.0", "core-js": "2.5.1", "es6-shim": "0.35.3", "jasmine-core": "2.8.0", @@ -79,25 +87,17 @@ "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "ngx-library-builder": "1.1.3", + "npm-run-all": "^4.1.1", "plugin-typescript": "7.1.0", "protractor": "5.1.2", "replace": "0.3.0", + "rxjs": "5.4.3", "standard-version": "4.2.0", "tota11y": "0.1.6", "ts-node": "3.3.0", "tslint": "5.7.0", "typescript": "2.5.3", - "zone.js": "0.8.18", - "@angular/animations": "4.4.4", - "@angular/common": "4.4.4", - "@angular/compiler": "4.4.4", - "@angular/core": "4.4.4", - "@angular/forms": "4.4.4", - "@angular/http": "4.4.4", - "@angular/platform-browser": "4.4.4", - "@angular/platform-browser-dynamic": "4.4.4", - "@angular/router": "4.4.4", - "rxjs": "5.4.3" + "zone.js": "0.8.18" }, "engines": { "node": ">=8.0.0"