content is added

This commit is contained in:
crusader 2019-04-30 02:54:36 +09:00
parent 4f281e18e2
commit 1f5ec4db64
50 changed files with 827 additions and 41 deletions

View File

@ -31,7 +31,9 @@
"projects/odds-crawler-frontend-common/tsconfig.lib.json", "projects/odds-crawler-frontend-common/tsconfig.lib.json",
"projects/odds-crawler-frontend-common/tsconfig.spec.json" "projects/odds-crawler-frontend-common/tsconfig.spec.json"
], ],
"exclude": ["**/node_modules/**"] "exclude": [
"**/node_modules/**"
]
} }
} }
} }
@ -59,7 +61,9 @@
"projects/odds-crawler-frontend-app/src/favicon.ico", "projects/odds-crawler-frontend-app/src/favicon.ico",
"projects/odds-crawler-frontend-app/src/assets" "projects/odds-crawler-frontend-app/src/assets"
], ],
"styles": ["projects/odds-crawler-frontend-app/src/styles.scss"], "styles": [
"projects/odds-crawler-frontend-app/src/styles.scss"
],
"scripts": [], "scripts": [],
"es5BrowserSupport": true "es5BrowserSupport": true
}, },
@ -114,7 +118,9 @@
"polyfills": "projects/odds-crawler-frontend-app/src/polyfills.ts", "polyfills": "projects/odds-crawler-frontend-app/src/polyfills.ts",
"tsConfig": "projects/odds-crawler-frontend-app/tsconfig.spec.json", "tsConfig": "projects/odds-crawler-frontend-app/tsconfig.spec.json",
"karmaConfig": "projects/odds-crawler-frontend-app/karma.conf.js", "karmaConfig": "projects/odds-crawler-frontend-app/karma.conf.js",
"styles": ["projects/odds-crawler-frontend-app/src/styles.scss"], "styles": [
"projects/odds-crawler-frontend-app/src/styles.scss"
],
"scripts": [], "scripts": [],
"assets": [ "assets": [
"projects/odds-crawler-frontend-app/src/favicon.ico", "projects/odds-crawler-frontend-app/src/favicon.ico",
@ -129,7 +135,9 @@
"projects/odds-crawler-frontend-app/tsconfig.app.json", "projects/odds-crawler-frontend-app/tsconfig.app.json",
"projects/odds-crawler-frontend-app/tsconfig.spec.json" "projects/odds-crawler-frontend-app/tsconfig.spec.json"
], ],
"exclude": ["**/node_modules/**"] "exclude": [
"**/node_modules/**"
]
} }
} }
} }
@ -160,7 +168,9 @@
"builder": "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options": { "options": {
"tsConfig": "projects/odds-crawler-frontend-app-e2e/tsconfig.e2e.json", "tsConfig": "projects/odds-crawler-frontend-app-e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"] "exclude": [
"**/node_modules/**"
]
} }
} }
} }
@ -198,7 +208,79 @@
"projects/odds-crawler-frontend-layout/tsconfig.lib.json", "projects/odds-crawler-frontend-layout/tsconfig.lib.json",
"projects/odds-crawler-frontend-layout/tsconfig.spec.json" "projects/odds-crawler-frontend-layout/tsconfig.spec.json"
], ],
"exclude": ["**/node_modules/**"] "exclude": [
"**/node_modules/**"
]
}
}
}
},
"odds-crawler-frontend-tab": {
"root": "projects/odds-crawler-frontend-tab",
"sourceRoot": "projects/odds-crawler-frontend-tab/src",
"projectType": "library",
"prefix": "odds-crawler-tab",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/odds-crawler-frontend-tab/tsconfig.lib.json",
"project": "projects/odds-crawler-frontend-tab/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/odds-crawler-frontend-tab/src/test.ts",
"tsConfig": "projects/odds-crawler-frontend-tab/tsconfig.spec.json",
"karmaConfig": "projects/odds-crawler-frontend-tab/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/odds-crawler-frontend-tab/tsconfig.lib.json",
"projects/odds-crawler-frontend-tab/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"odds-crawler-frontend-network": {
"root": "projects/odds-crawler-frontend-network",
"sourceRoot": "projects/odds-crawler-frontend-network/src",
"projectType": "library",
"prefix": "odds-crawler-network",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/odds-crawler-frontend-network/tsconfig.lib.json",
"project": "projects/odds-crawler-frontend-network/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/odds-crawler-frontend-network/src/test.ts",
"tsConfig": "projects/odds-crawler-frontend-network/tsconfig.spec.json",
"karmaConfig": "projects/odds-crawler-frontend-network/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/odds-crawler-frontend-network/tsconfig.lib.json",
"projects/odds-crawler-frontend-network/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
} }
} }
} }

28
package-lock.json generated
View File

@ -4044,14 +4044,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -4066,20 +4064,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -4196,8 +4191,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -4209,7 +4203,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -4224,7 +4217,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -4232,14 +4224,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -4258,7 +4248,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -4339,8 +4328,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -4352,7 +4340,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -4474,7 +4461,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",

View File

@ -5,8 +5,10 @@
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"build": "ng build", "build": "ng build",
"build:library": "ng build odds-crawler-frontend-common && npm-run-all -p build:library:*", "build:library": "ng build odds-crawler-frontend-common && npm-run-all -s build:library:*",
"build:library:layout": "ng build odds-crawler-frontend-layout", "build:library:layout": "ng build odds-crawler-frontend-layout",
"build:library:network": "ng build odds-crawler-frontend-network",
"build:library:tab": "ng build odds-crawler-frontend-tab",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"

View File

@ -4,6 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { OddsCrawlerFrontendCommonModule } from '@odds-crawler/common'; import { OddsCrawlerFrontendCommonModule } from '@odds-crawler/common';
import { OddsCrawlerFrontendLayoutModule } from '@odds-crawler/layout'; import { OddsCrawlerFrontendLayoutModule } from '@odds-crawler/layout';
import { OddsCrawlerFrontendTabModule } from '@odds-crawler/tab';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppStoreModule } from './app-store.module'; import { AppStoreModule } from './app-store.module';
@ -14,8 +15,9 @@ import { AppComponent } from './app.component';
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,
OddsCrawlerFrontendCommonModule, OddsCrawlerFrontendCommonModule.forRoot(),
OddsCrawlerFrontendLayoutModule, OddsCrawlerFrontendLayoutModule.forRoot(),
OddsCrawlerFrontendTabModule.forRoot(),
AppRoutingModule, AppRoutingModule,
AppStoreModule AppStoreModule
], ],

View File

@ -1,17 +1,17 @@
<mat-tab-group> <mat-tab-group>
<mat-tab label="First"> <mat-tab label="First">
<ng-template matTabContent> <ng-template matTabContent>
Content 11 <odds-crawler-tab-main></odds-crawler-tab-main>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="Second"> <mat-tab label="Second">
<ng-template matTabContent> <ng-template matTabContent>
Content 21 <odds-crawler-tab-main></odds-crawler-tab-main>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="Third"> <mat-tab label="Third">
<ng-template matTabContent> <ng-template matTabContent>
Content 31 <odds-crawler-tab-main></odds-crawler-tab-main>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>

View File

@ -4,6 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { OddsCrawlerFrontendCommonModule } from '@odds-crawler/common'; import { OddsCrawlerFrontendCommonModule } from '@odds-crawler/common';
import { OddsCrawlerFrontendLayoutModule } from '@odds-crawler/layout'; import { OddsCrawlerFrontendLayoutModule } from '@odds-crawler/layout';
import { OddsCrawlerFrontendTabModule } from '@odds-crawler/tab';
import { COMPONENTS } from './component'; import { COMPONENTS } from './component';
import { MainRoutingPageModule } from './main-routing.page.module'; import { MainRoutingPageModule } from './main-routing.page.module';
@ -14,6 +15,7 @@ import { MainRoutingPageModule } from './main-routing.page.module';
TranslateModule, TranslateModule,
OddsCrawlerFrontendCommonModule, OddsCrawlerFrontendCommonModule,
OddsCrawlerFrontendLayoutModule, OddsCrawlerFrontendLayoutModule,
OddsCrawlerFrontendTabModule,
MainRoutingPageModule MainRoutingPageModule
], ],
declarations: [...COMPONENTS] declarations: [...COMPONENTS]

View File

@ -1,4 +1,4 @@
import { NgModule } from '@angular/core'; import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { CommonMaterialModule } from './common.material.module'; import { CommonMaterialModule } from './common.material.module';
@ -9,4 +9,19 @@ import { CommonMaterialComponent } from './component/material.component';
imports: [CommonModule, CommonMaterialModule], imports: [CommonModule, CommonMaterialModule],
exports: [CommonMaterialModule, CommonMaterialComponent] exports: [CommonMaterialModule, CommonMaterialComponent]
}) })
export class OddsCrawlerFrontendCommonModule {} export class OddsCrawlerFrontendCommonModule {
public static forRoot(): ModuleWithProviders<
OddsCrawlerFrontendCommonRootModule
> {
return {
ngModule: OddsCrawlerFrontendCommonRootModule,
providers: []
};
}
}
@NgModule({
imports: [],
exports: []
})
export class OddsCrawlerFrontendCommonRootModule {}

View File

@ -1,5 +1,5 @@
{ {
"name": "odds-crawler-frontend-layout", "name": "@odds-crawler/layout",
"version": "0.0.1", "version": "0.0.1",
"peerDependencies": { "peerDependencies": {
"@angular/common": "^7.2.0", "@angular/common": "^7.2.0",

View File

@ -1,4 +1,4 @@
import { NgModule } from '@angular/core'; import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
@ -15,4 +15,19 @@ export const COMPONENTS = [DefaultLayoutComponent, MainLayoutComponent];
imports: [CommonModule, RouterModule, OddsCrawlerFrontendCommonModule], imports: [CommonModule, RouterModule, OddsCrawlerFrontendCommonModule],
exports: [...COMPONENTS] exports: [...COMPONENTS]
}) })
export class OddsCrawlerFrontendLayoutModule {} export class OddsCrawlerFrontendLayoutModule {
public static forRoot(): ModuleWithProviders<
OddsCrawlerFrontendLayoutRootModule
> {
return {
ngModule: OddsCrawlerFrontendLayoutRootModule,
providers: []
};
}
}
@NgModule({
imports: [],
exports: []
})
export class OddsCrawlerFrontendLayoutRootModule {}

View File

@ -0,0 +1,24 @@
# OddsCrawlerFrontendNetwork
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
## Code scaffolding
Run `ng generate component component-name --project odds-crawler-frontend-network` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project odds-crawler-frontend-network`.
> Note: Don't forget to add `--project odds-crawler-frontend-network` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build odds-crawler-frontend-network` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build odds-crawler-frontend-network`, go to the dist folder `cd dist/odds-crawler-frontend-network` and run `npm publish`.
## Running unit tests
Run `ng test odds-crawler-frontend-network` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/odds-crawler-frontend-network'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/odds-crawler-frontend-network",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@ -0,0 +1,8 @@
{
"name": "@odds-crawler/network",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0"
}
}

View File

@ -0,0 +1,37 @@
<div>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FilterComponent } from './filter.component';
describe('network.FilterComponent', () => {
let component: FilterComponent;
let fixture: ComponentFixture<FilterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [FilterComponent]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FilterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'odds-crawler-network-filter',
templateUrl: './filter.component.html',
styles: ['./filter.component.scss']
})
export class FilterComponent implements OnInit {
constructor() {}
ngOnInit() {}
}

View File

@ -0,0 +1,6 @@
<div>
<odds-crawler-network-option></odds-crawler-network-option>
</div>
<div>
<odds-crawler-network-filter></odds-crawler-network-filter>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MainComponent } from './main.component';
describe('network.MainComponent', () => {
let component: MainComponent;
let fixture: ComponentFixture<MainComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [MainComponent]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MainComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'odds-crawler-network-main',
templateUrl: './main.component.html',
styles: ['./main.component.scss']
})
export class MainComponent implements OnInit {
constructor() {}
ngOnInit() {}
}

View File

@ -0,0 +1,32 @@
<div>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
<button mat-icon-button>
<mat-icon aria-label="Example icon-button with a heart icon"
>favorite</mat-icon
>
</button>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { OptionComponent } from './option.component';
describe('network.OptionComponent', () => {
let component: OptionComponent;
let fixture: ComponentFixture<OptionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [OptionComponent]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OptionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'odds-crawler-network-option',
templateUrl: './option.component.html',
styles: ['./option.component.scss']
})
export class OptionComponent implements OnInit {
constructor() {}
ngOnInit() {}
}

View File

@ -0,0 +1,34 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { OddsCrawlerFrontendCommonModule } from '@odds-crawler/common';
import { MainComponent } from './component/main.component';
import { FilterComponent } from './component/filter.component';
import { OptionComponent } from './component/option.component';
export const COMPONENTS = [MainComponent, FilterComponent, OptionComponent];
@NgModule({
declarations: [...COMPONENTS],
imports: [CommonModule, RouterModule, OddsCrawlerFrontendCommonModule],
exports: [...COMPONENTS]
})
export class OddsCrawlerFrontendNetworkModule {
public static forRoot(): ModuleWithProviders<
OddsCrawlerFrontendNetworkRootModule
> {
return {
ngModule: OddsCrawlerFrontendNetworkRootModule,
providers: []
};
}
}
@NgModule({
imports: [],
exports: []
})
export class OddsCrawlerFrontendNetworkRootModule {}

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { OddsCrawlerFrontendLayoutService } from './odds-crawler-frontend-layout.service';
describe('OddsCrawlerFrontendLayoutService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: OddsCrawlerFrontendLayoutService = TestBed.get(OddsCrawlerFrontendLayoutService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class OddsCrawlerFrontendLayoutService {
constructor() { }
}

View File

@ -0,0 +1,6 @@
/*
* Public API Surface of odds-crawler-frontend-network
*/
export * from './lib/network.module';
export * from './lib/component/main.component';

View File

@ -0,0 +1,22 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -0,0 +1,32 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"oddsCrawlerNetwork",
"camelCase"
],
"component-selector": [
true,
"element",
"odds-crawler-network",
"kebab-case"
]
}
}

View File

@ -0,0 +1,24 @@
# OddsCrawlerFrontendTab
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
## Code scaffolding
Run `ng generate component component-name --project odds-crawler-frontend-tab` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project odds-crawler-frontend-tab`.
> Note: Don't forget to add `--project odds-crawler-frontend-tab` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build odds-crawler-frontend-tab` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build odds-crawler-frontend-tab`, go to the dist folder `cd dist/odds-crawler-frontend-tab` and run `npm publish`.
## Running unit tests
Run `ng test odds-crawler-frontend-tab` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/odds-crawler-frontend-tab'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/odds-crawler-frontend-tab",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@ -0,0 +1,8 @@
{
"name": "@odds-crawler/tab",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0"
}
}

View File

@ -0,0 +1,17 @@
<mat-tab-group>
<mat-tab label="First">
<ng-template matTabContent>
<odds-crawler-network-main></odds-crawler-network-main>
</ng-template>
</mat-tab>
<mat-tab label="Second">
<ng-template matTabContent>
<odds-crawler-network-main></odds-crawler-network-main>
</ng-template>
</mat-tab>
<mat-tab label="Third">
<ng-template matTabContent>
<odds-crawler-network-main></odds-crawler-network-main>
</ng-template>
</mat-tab>
</mat-tab-group>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MainComponent } from './main.component';
describe('tab.MainComponent', () => {
let component: MainComponent;
let fixture: ComponentFixture<MainComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [MainComponent]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MainComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'odds-crawler-tab-main',
templateUrl: './main.component.html',
styles: ['./main.component.scss']
})
export class MainComponent implements OnInit {
constructor() {}
ngOnInit() {}
}

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { OddsCrawlerFrontendLayoutService } from './odds-crawler-frontend-layout.service';
describe('OddsCrawlerFrontendLayoutService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: OddsCrawlerFrontendLayoutService = TestBed.get(OddsCrawlerFrontendLayoutService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class OddsCrawlerFrontendLayoutService {
constructor() { }
}

View File

@ -0,0 +1,38 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { OddsCrawlerFrontendCommonModule } from '@odds-crawler/common';
import { OddsCrawlerFrontendNetworkModule } from '@odds-crawler/network';
import { MainComponent } from './component/main.component';
export const COMPONENTS = [MainComponent];
@NgModule({
declarations: [...COMPONENTS],
imports: [
CommonModule,
RouterModule,
OddsCrawlerFrontendCommonModule,
OddsCrawlerFrontendNetworkModule
],
exports: [...COMPONENTS]
})
export class OddsCrawlerFrontendTabModule {
public static forRoot(): ModuleWithProviders<
OddsCrawlerFrontendTabRootModule
> {
return {
ngModule: OddsCrawlerFrontendTabRootModule,
providers: []
};
}
}
@NgModule({
imports: [],
exports: []
})
export class OddsCrawlerFrontendTabRootModule {}

View File

@ -0,0 +1,6 @@
/*
* Public API Surface of odds-crawler-frontend-tab
*/
export * from './lib/tab.module';
export * from './lib/component/main.component';

View File

@ -0,0 +1,22 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -0,0 +1,32 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"oddsCrawlerTab",
"camelCase"
],
"component-selector": [
true,
"element",
"odds-crawler-tab",
"kebab-case"
]
}
}

View File

@ -15,7 +15,9 @@
"lib": ["es2018", "dom"], "lib": ["es2018", "dom"],
"paths": { "paths": {
"@odds-crawler/common": ["dist/odds-crawler-frontend-common"], "@odds-crawler/common": ["dist/odds-crawler-frontend-common"],
"@odds-crawler/layout": ["dist/odds-crawler-frontend-layout"] "@odds-crawler/layout": ["dist/odds-crawler-frontend-layout"],
"@odds-crawler/tab": ["dist/odds-crawler-frontend-tab"],
"@odds-crawler/network": ["dist/odds-crawler-frontend-network"]
} }
} }
} }