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

Commit 03bc974

Browse files
authored
Cleanup (#24)
* change how to export default * clean up imports
1 parent cd0da34 commit 03bc974

33 files changed

+41
-99
lines changed

src/RouterWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import {Provider} from 'react-redux';
33
import {ConnectedRouter} from 'connected-react-router';
44
import {History} from 'history';
5-
import {Route, Switch, Redirect, StaticRouter} from 'react-router-dom';
5+
import {Redirect, Route, StaticRouter, Switch} from 'react-router-dom';
66
import AboutAsync from './views/about/AboutAsync';
77
import Home from './views/home/Home';
88
import Contact from './views/contact/Contact';

src/server/ServerManager.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Hapi from 'hapi';
22
import IController from './controllers/IController';
33

4-
class ServerManager {
4+
export default class ServerManager {
55

66
public static readonly PORT: number = parseInt(process.env.PORT, 10) || 3000;
77
public static readonly HOST: string = process.env.HOST || '0.0.0.0';
@@ -54,5 +54,3 @@ class ServerManager {
5454
}
5555

5656
}
57-
58-
export default ServerManager;

src/server/controllers/AssetsController.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Hapi from 'hapi';
33
import IController from './IController';
44
import RequestMethodEnum from '../../constants/RequestMethodEnum';
55

6-
class AssetsController implements IController {
6+
export default class AssetsController implements IController {
77

88
public mapRoutes(server: Hapi.Server): void {
99
server.route({
@@ -16,5 +16,3 @@ class AssetsController implements IController {
1616
}
1717

1818
}
19-
20-
export default AssetsController;

src/server/controllers/IController.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import * as Hapi from 'hapi';
22

3-
interface IController {
3+
export default interface IController {
44
mapRoutes(server: Hapi.Server): void;
55
}
6-
7-
export default IController;

src/server/controllers/ReactController.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import IRenderReducerState from '../../stores/render/IRenderReducerState';
1515
import RequestMethodEnum from '../../constants/RequestMethodEnum';
1616
import {createMemoryHistory, History} from 'history';
1717

18-
class ReactController implements IController {
18+
export default class ReactController implements IController {
1919

2020
private _html: string = null;
2121

@@ -92,5 +92,3 @@ class ReactController implements IController {
9292
}
9393

9494
}
95-
96-
export default ReactController;

src/server/plugin/HapiWebpackHotPlugin.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as notifier from 'node-notifier';
44
import * as Hapi from 'hapi';
55
import ServerManager from '../ServerManager';
66

7-
class HapiWebpackHotPlugin {
7+
export default class HapiWebpackHotPlugin {
88

99
public get plugin(): Hapi.ServerRegisterPluginObject<any> {
1010
const config: Webpack.Configuration = require('../../../webpack.config.js'); // tslint:disable-line no-require-imports
@@ -43,5 +43,3 @@ class HapiWebpackHotPlugin {
4343
}
4444

4545
}
46-
47-
export default HapiWebpackHotPlugin;

src/stores/IAction.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import {Action} from 'redux';
33
/**
44
* https://github.com/acdlite/flux-standard-action
55
*/
6-
interface IAction<T> extends Action<string> {
6+
export default interface IAction<T> extends Action<string> {
77
type: string;
88
payload?: T;
99
error?: boolean;
1010
meta?: any;
1111
}
12-
13-
export default IAction;

src/stores/ISagaStore.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import IStore from './IStore';
22

3-
interface ISagaStore extends IStore {
3+
export default interface ISagaStore extends IStore {
44
runSaga: any; // TODO: figure out type
55
endSaga: any; // TODO: figure out type
66
}
7-
8-
export default ISagaStore;

src/stores/IStore.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import IUserReducerState from './user/IUserReducerState';
77
import IRenderReducerState from './render/IRenderReducerState';
88
import IModalReducerState from './modal/IModalReducerState';
99

10-
interface IStore extends Store<IStore> {
10+
export default interface IStore extends Store<IStore> {
1111
readonly form: FormReducer;
1212
readonly loadingReducer: ILoadingReducerState;
1313
readonly metaReducer: IMetaReducerState;
@@ -16,5 +16,3 @@ interface IStore extends Store<IStore> {
1616
readonly userReducer: IUserReducerState;
1717
readonly router: RouterState;
1818
}
19-
20-
export default IStore;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
interface ILoadingReducerState {
1+
export default interface ILoadingReducerState {
22
readonly isLoading: boolean;
33
}
4-
5-
export default ILoadingReducerState;

0 commit comments

Comments
 (0)