Skip to content

Commit acae5da

Browse files
Merge pull request mathisGarberg#21 from TomHAnderson/feature/singular-names
Feature/singular names
2 parents a7e6d9c + 221e953 commit acae5da

File tree

100 files changed

+83
-88
lines changed

Some content is hidden

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

100 files changed

+83
-88
lines changed

.documentation/additional-resources.rst

Lines changed: 2 additions & 0 deletions

.documentation/core.rst

Lines changed: 2 additions & 0 deletions

.documentation/data.rst

Lines changed: 5 additions & 0 deletions

.documentation/index.rst

Lines changed: 6 additions & 5 deletions

.documentation/layout.rst

Lines changed: 2 additions & 0 deletions

.documentation/module.rst

Lines changed: 2 additions & 0 deletions

.documentation/shared.rst

Lines changed: 2 additions & 0 deletions

.documentation/theme.rst

Lines changed: 9 additions & 0 deletions

src/app/app-routing.module.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

4-
import { AuthLayoutComponent } from './layouts/auth-layout/auth-layout.component';
5-
import { ContentLayoutComponent } from './layouts/content-layout/content-layout.component';
4+
import { AuthLayoutComponent } from './layout/auth-layout/auth-layout.component';
5+
import { ContentLayoutComponent } from './layout/content-layout/content-layout.component';
66

7-
import { NoAuthGuard } from '@app/core';
7+
import { NoAuthGuard } from './core/guard/no-auth.guard';
88

99
const routes: Routes = [
1010
{
@@ -20,25 +20,25 @@ const routes: Routes = [
2020
{
2121
path: 'dashboard',
2222
loadChildren: () =>
23-
import('./modules/home/home.module').then(m => m.HomeModule)
23+
import('./module/home/home.module').then(m => m.HomeModule)
2424
},
2525
{
2626
path: 'about',
2727
loadChildren: () =>
28-
import('./modules/about/about.module').then(m => m.AboutModule)
28+
import('./module/about/about.module').then(m => m.AboutModule)
2929
},
3030
{
3131
path: 'contact',
3232
loadChildren: () =>
33-
import('./modules/contact/contact.module').then(m => m.ContactModule)
33+
import('./module/contact/contact.module').then(m => m.ContactModule)
3434
}
3535
]
3636
},
3737
{
3838
path: 'auth',
3939
component: AuthLayoutComponent,
4040
loadChildren: () =>
41-
import('./modules/auth/auth.module').then(m => m.AuthModule)
41+
import('./module/auth/auth.module').then(m => m.AuthModule)
4242
},
4343
// Fallback when no prior routes is matched
4444
{ path: '**', redirectTo: '/auth/login', pathMatch: 'full' }

src/app/app.module.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33

4-
import { CoreModule } from '@app/core';
5-
import { SharedModule } from '@app/shared';
4+
import { CoreModule } from './core/core.module';
5+
import { SharedModule } from './shared/shared.module';
66

77
import { AppComponent } from './app.component';
88
import { AppRoutingModule } from './app-routing.module';
99

10-
import { ContentLayoutComponent } from './layouts/content-layout/content-layout.component';
11-
import { NavComponent } from './layouts/nav/nav.component';
12-
import { FooterComponent } from './layouts/footer/footer.component';
10+
import { ContentLayoutComponent } from './layout/content-layout/content-layout.component';
11+
import { NavComponent } from './layout/nav/nav.component';
12+
import { FooterComponent } from './layout/footer/footer.component';
1313

14-
import { AuthModule } from './modules/auth/auth.module';
15-
import { AuthLayoutComponent } from './layouts/auth-layout/auth-layout.component';
14+
import { AuthModule } from './module/auth/auth.module';
15+
import { AuthLayoutComponent } from './layout/auth-layout/auth-layout.component';
1616
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
1717

1818
@NgModule({

src/app/core/app-config.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/app/core/core.module.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { NgModule, Optional, SkipSelf } from '@angular/core';
22
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
33

4-
import { environment } from '@env/environment';
5-
import { AuthGuard } from './guards/auth.guard';
6-
import { NoAuthGuard } from './guards/no-auth.guard';
4+
import { AuthGuard } from './guard/auth.guard';
5+
import { NoAuthGuard } from './guard/no-auth.guard';
6+
import { throwIfAlreadyLoaded } from './guard/module-import.guard';
77

8-
import { NgxSpinnerModule } from 'ngx-spinner';
8+
import { TokenInterceptor } from './interceptor/token.interceptor';
99

10-
import { TokenInterceptor } from './interceptors/token.interceptor';
10+
import { NgxSpinnerModule } from 'ngx-spinner';
1111

12-
import { throwIfAlreadyLoaded } from './guards/module-import.guard';
1312

1413
@NgModule({
1514
imports: [
File renamed without changes.

src/app/core/guards/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/app/core/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/app/core/interceptors/token.interceptor.ts renamed to src/app/core/interceptor/token.interceptor.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,11 @@ import {
55
HttpEvent,
66
HttpInterceptor
77
} from '@angular/common/http';
8-
// import { AuthService } from './auth/auth.service';
98
import { Observable } from 'rxjs/Observable';
109

1110
@Injectable()
1211
export class TokenInterceptor implements HttpInterceptor {
13-
constructor() {}
1412
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
15-
16-
// request = request.clone({
17-
// setHeaders: {
18-
// Authorization: `Bearer ${this.auth.getToken()}`
19-
// }
20-
// });
2113
return next.handle(request);
2214
}
2315
}

src/app/core/interceptors/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

src/app/data/service/json-api.service.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { Injectable } from '@angular/core';
22
import { HttpClient } from '@angular/common/http';
33
import { Observable, throwError } from 'rxjs';
4-
import { delay, map, catchError } from 'rxjs/operators';
5-
6-
import { config } from '../app-config';
4+
import { delay, catchError } from 'rxjs/operators';
5+
import { environment } from '@env/environment';
76

87
@Injectable({
98
providedIn: 'root'
@@ -12,7 +11,7 @@ export class JsonApiService {
1211
constructor(private httpClient: HttpClient) {}
1312

1413
fetch(url): Observable<any> {
15-
return this.httpClient.get(this.getBaseUrl() + config.API_URL + url).pipe(
14+
return this.httpClient.get(this.getBaseUrl() + environment.API_URL + url).pipe(
1615
delay(100),
1716
catchError(this.handleError)
1817
);

src/app/layouts/content-layout/content-layout.component.ts renamed to src/app/layout/content-layout/content-layout.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { OverlayContainer } from '@angular/cdk/overlay';
3-
import { ThemeService } from '@app/core';
3+
import { ThemeService } from '../../core/service/theme.service';
44
import { Observable } from 'rxjs';
55

66
@Component({

src/app/layouts/footer/footer.component.ts renamed to src/app/layout/footer/footer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
22
import { environment as env } from '@env/environment';
33
import { Observable } from 'rxjs/Observable';
4-
import { ThemeService } from '@app/core';
4+
import { ThemeService } from '../../core/service/theme.service';
55

66
@Component({
77
selector: 'app-footer',

src/app/layouts/nav/nav.component.ts renamed to src/app/layout/nav/nav.component.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,12 @@ import { environment } from '@env/environment';
77
templateUrl: './nav.component.html',
88
styleUrls: ['./nav.component.scss']
99
})
10-
export class NavComponent implements OnInit {
10+
export class NavComponent {
1111
version = environment.version;
1212

13-
1413
navItems = [
1514
{ link: '/dashboard/home', title: 'Home' },
1615
{ link: '/about', title: 'About' },
1716
{ link: '/contact', title: 'Contact' }
1817
];
19-
20-
constructor() { }
21-
22-
ngOnInit() {
23-
24-
}
25-
26-
2718
}

src/app/modules/about/about-routing.module.ts renamed to src/app/module/about/about-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

4-
import { AboutComponent } from './pages/about/about.component';
4+
import { AboutComponent } from './page/about/about.component';
55

66
const routes: Routes = [
77
{

src/app/modules/about/about.module.ts renamed to src/app/module/about/about.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { NgModule } from '@angular/core';
22

3-
import { SharedModule } from '@app/shared';
3+
import { SharedModule } from '../../shared/shared.module';
44

55
import { AboutRoutingModule } from './about-routing.module';
6-
import { AboutComponent } from './pages/about/about.component';
6+
import { AboutComponent } from './page/about/about.component';
77

88
@NgModule({
99
declarations: [AboutComponent],

src/app/modules/auth/auth.module.ts renamed to src/app/module/auth/auth.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
import { LoginComponent } from './pages/login/login.component';
4-
import { RegisterComponent } from './pages/register/register.component';
5-
import { SharedModule } from '@app/shared';
3+
import { LoginComponent } from './page/login/login.component';
4+
import { RegisterComponent } from './page/register/register.component';
5+
import { SharedModule } from '../../shared/shared.module';
66

77
import { AuthRoutingModule } from './auth.routing';
88

src/app/modules/auth/auth.routing.ts renamed to src/app/module/auth/auth.routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

4-
import { LoginComponent } from './pages/login/login.component';
5-
import { RegisterComponent } from './pages/register/register.component';
4+
import { LoginComponent } from './page/login/login.component';
5+
import { RegisterComponent } from './page/register/register.component';
66

77
const routes: Routes = [
88
{

src/app/modules/auth/pages/login/login.component.ts renamed to src/app/module/auth/page/login/login.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
44
import { tap, delay, finalize, catchError } from 'rxjs/operators';
55
import { of } from 'rxjs';
66

7-
import { AuthService } from '../../../../core/services/auth.service';
7+
import { AuthService } from '../../../../core/service/auth.service';
88

99
@Component({
1010
selector: 'app-login',

src/app/modules/contact/contact-routing.module.ts renamed to src/app/module/contact/contact-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Routes, RouterModule } from '@angular/router';
2-
import { ContactComponent } from './pages/contact/contact.component';
2+
import { ContactComponent } from './page/contact/contact.component';
33

44
const routes: Routes = [
55
{

src/app/modules/contact/contact.module.ts renamed to src/app/module/contact/contact.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NgModule } from '@angular/core';
22

3-
import { SharedModule } from '@app/shared';
3+
import { SharedModule } from '../../shared/shared.module';
44
import { ContactRoutes } from './contact-routing.module';
5-
import { ContactComponent } from './pages/contact/contact.component';
5+
import { ContactComponent } from './page/contact/contact.component';
66

77

88
@NgModule({

src/app/modules/home/home.module.ts renamed to src/app/module/home/home.module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { NgModule } from '@angular/core';
22

3-
import { MyModalComponent } from './modals/my-modal.component';
3+
import { MyModalComponent } from './modal/my-modal.component';
44

5-
import { HomeComponent } from './pages/home.component';
5+
import { HomeComponent } from './page/home.component';
66
import { HomeRoutingModule } from './home.routing';
77

8-
import { SharedModule } from '@app/shared';
9-
import { ProjectItemComponent } from './pages/project-item/project-item.component';
10-
import { ProjectDetailsComponent } from './pages/project-details/project-details.component';
8+
import { SharedModule } from '../../shared/shared.module';
9+
import { ProjectItemComponent } from './page/project-item/project-item.component';
10+
import { ProjectDetailsComponent } from './page/project-details/project-details.component';
1111

1212
@NgModule({
1313
declarations: [

src/app/modules/home/home.routing.ts renamed to src/app/module/home/home.routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33
import { ProjectResolver } from './project-resolver.service';
4-
import { HomeComponent } from './pages/home.component';
5-
import { ProjectDetailsComponent } from './pages/project-details/project-details.component';
4+
import { HomeComponent } from './page/home.component';
5+
import { ProjectDetailsComponent } from './page/project-details/project-details.component';
66

77
export const routes: Routes = [
88
{

src/app/modules/home/pages/home.component.ts renamed to src/app/module/home/page/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ProjectService } from '../../../data/service/project.service';
55
import { Project } from '../../../data/schema/project';
66
import { Observable } from 'rxjs';
77

8-
import { MyModalComponent } from '../modals/my-modal.component';
8+
import { MyModalComponent } from '../modal/my-modal.component';
99

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

src/app/shared/components/control-messages/control-messages.component.ts renamed to src/app/shared/component/control-messages/control-messages.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Input } from '@angular/core';
22
import { FormControl } from '@angular/forms';
3-
import { ValidationService } from '../../services/validation.service';
3+
import { ValidationService } from '../../service/validation.service';
44

55
@Component({
66
selector: 'app-control-messages',

src/app/shared/component/spinner/spinner.component.scss

Whitespace-only changes.

src/app/shared/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/shared/services/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/shared/shared.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ library.add(
6464
faBook
6565
);
6666

67-
import { ControlMessagesComponent } from './components/control-messages/control-messages.component';
68-
import { SpinnerComponent } from './components/spinner/spinner.component';
67+
import { ControlMessagesComponent } from './component/control-messages/control-messages.component';
68+
import { SpinnerComponent } from './component/spinner/spinner.component';
6969

7070
@NgModule({
7171
imports: [

src/environments/environment.prod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export const environment = {
66
version: env.npm_package_version,
77
serverUrl: '/api',
88
envName: 'PROD',
9+
API_URL: 'assets/api'
910
};

0 commit comments

Comments
 (0)