Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit b9bc153

Browse files
committed
resolves #13
1 parent 3ba1499 commit b9bc153

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+184
-95
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
"license": "BSD-3-Clause",
55
"author": "Jean-Pierre E. Poveda",
66
"scripts": {
7+
"build": "ng build -prod",
8+
"clean": "rm -rf dist; rm -rf dist-server; rm -rf node_module; yarn install",
9+
"e2e": "ng e2e",
710
"install": "chmod u=rwx,g=rx scripts/*",
11+
"lint": "ng lint",
812
"ng": "ng",
913
"start": "ng serve",
1014
"start:sw": "scripts/start:sw.sh",
11-
"build": "ng build --prod",
12-
"test": "ng test",
13-
"lint": "ng lint",
14-
"e2e": "ng e2e"
15+
"test": "ng test"
1516
},
1617
"private": true,
1718
"homepage": "https://github.com/sakuraapi",

src/app/app.component.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {RouterTestingModule} from '@angular/router/testing';
77
import {SwUpdate} from '@angular/service-worker';
88
import {Observable} from 'rxjs/Observable';
99
import {AppComponent} from './app.component';
10+
import {CoreModule} from './core/core.module';
1011
import {SharedModule} from './shared/shared.module';
1112

1213
@Injectable()
@@ -23,6 +24,7 @@ describe('AppComponent', () => {
2324
TestBed
2425
.configureTestingModule({
2526
imports: [
27+
CoreModule,
2628
RouterTestingModule,
2729
SharedModule
2830
],

src/app/app.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {
33
OnInit
44
} from '@angular/core';
55
import {SwUpdate} from '@angular/service-worker';
6-
import {BrowserService} from './shared/services/browser.service';
7-
import {LogService} from './shared/services/log.service';
8-
import {LocalStorageService} from './shared/services/storage.service';
6+
import {BrowserService} from './core/services/browser.service';
7+
import {LogService} from './core/services/log.service';
8+
import {LocalStorageService} from './core/services/storage.service';
99

1010
@Component({
1111
selector: 'app-root',

src/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import {ServiceWorkerModule} from '@angular/service-worker';
66
import {environment} from '../environments/environment';
77
import {AppRoutingModule} from './app-routing.module';
88
import {AppComponent} from './app.component';
9+
import {CoreModule} from './core/core.module';
910
import {HomeModule} from './home/home.module';
1011
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
11-
import './shared/rxjs-imports';
12+
import './rxjs-imports';
1213
import {SharedModule} from './shared/shared.module';
1314

1415
@NgModule({
@@ -19,6 +20,7 @@ import {SharedModule} from './shared/shared.module';
1920
imports: [
2021
BrowserModule.withServerTransition({appId: 'serverApp'}),
2122
BrowserAnimationsModule,
23+
CoreModule,
2224
SharedModule,
2325
HomeModule,
2426
HttpClientModule,

src/app/app.server.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {NgModule} from '@angular/core';
22
import {ServerModule} from '@angular/platform-server';
3-
import 'shared/rxjs-imports';
3+
import 'rxjs-imports';
44
import {AppComponent} from './app.component';
55
import {AppModule} from './app.module';
66

src/app/core/core.module.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {NgModule} from '@angular/core';
2+
import {httpProviders} from './http/http-providers';
3+
import {BrowserService} from './services/browser.service';
4+
import {GithubService} from './services/github.service';
5+
import {GoogleAnalyticsService} from './services/google-analytics.service';
6+
import {LogService} from './services/log.service';
7+
import {WordpressService} from './services/wordpress.service';
8+
9+
@NgModule({
10+
providers: [
11+
BrowserService,
12+
GithubService,
13+
GoogleAnalyticsService,
14+
httpProviders,
15+
LogService,
16+
WordpressService
17+
]
18+
})
19+
export class CoreModule {
20+
}

src/app/shared/services/http/base-api.spec.ts renamed to src/app/core/http/base-api.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
} from '@angular/common/http/testing';
66
import {Injectable} from '@angular/core';
77
import {TestBed} from '@angular/core/testing';
8+
import {CoreModule} from '../core.module';
89
import {BaseApiService} from './base-api';
910

1011
describe('BaseApiService', () => {
@@ -22,6 +23,7 @@ describe('BaseApiService', () => {
2223
TestBed
2324
.configureTestingModule({
2425
imports: [
26+
CoreModule,
2527
HttpClientTestingModule
2628
],
2729
providers: [

src/app/shared/services/http/github-api.service.spec.ts renamed to src/app/core/http/github-api.service.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {
44
HttpTestingController
55
} from '@angular/common/http/testing';
66
import {TestBed} from '@angular/core/testing';
7-
import {SharedModule} from '../../shared.module';
7+
import {SharedModule} from '../../shared/shared.module';
8+
import {CoreModule} from '../core.module';
89
import {GithubApiService} from './github-api.service';
910
import {httpProviders} from './http-providers';
1011

@@ -15,6 +16,7 @@ describe('GithubApiService', () => {
1516
beforeEach(() => {
1617
TestBed.configureTestingModule({
1718
imports: [
19+
CoreModule,
1820
HttpClientTestingModule,
1921
SharedModule
2022
],

src/app/shared/services/http/github-api.service.ts renamed to src/app/core/http/github-api.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
import {Injectable} from '@angular/core';
66
import {Observable} from 'rxjs/Observable';
77
import {Subject} from 'rxjs/Subject';
8-
import {environment} from '../../../../environments/environment';
9-
import {LogService} from '../log.service';
8+
import {environment} from '../../../environments/environment';
9+
import {LogService} from '../services/log.service';
1010
import {
1111
BaseApiService,
1212
IHttpClientOptionsRequest

0 commit comments

Comments
 (0)