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

Cleanup #24

Merged
merged 2 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
change how to export default
  • Loading branch information
codeBelt committed Nov 15, 2018
commit 6ebf5ed3684e7776586e7a03d0b5ffbc98a2ba5c
4 changes: 1 addition & 3 deletions src/server/ServerManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Hapi from 'hapi';
import IController from './controllers/IController';

class ServerManager {
export default class ServerManager {

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

}

export default ServerManager;
4 changes: 1 addition & 3 deletions src/server/controllers/AssetsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Hapi from 'hapi';
import IController from './IController';
import RequestMethodEnum from '../../constants/RequestMethodEnum';

class AssetsController implements IController {
export default class AssetsController implements IController {

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

}

export default AssetsController;
4 changes: 1 addition & 3 deletions src/server/controllers/IController.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as Hapi from 'hapi';

interface IController {
export default interface IController {
mapRoutes(server: Hapi.Server): void;
}

export default IController;
4 changes: 1 addition & 3 deletions src/server/controllers/ReactController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import IRenderReducerState from '../../stores/render/IRenderReducerState';
import RequestMethodEnum from '../../constants/RequestMethodEnum';
import {createMemoryHistory, History} from 'history';

class ReactController implements IController {
export default class ReactController implements IController {

private _html: string = null;

Expand Down Expand Up @@ -92,5 +92,3 @@ class ReactController implements IController {
}

}

export default ReactController;
4 changes: 1 addition & 3 deletions src/server/plugin/HapiWebpackHotPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as notifier from 'node-notifier';
import * as Hapi from 'hapi';
import ServerManager from '../ServerManager';

class HapiWebpackHotPlugin {
export default class HapiWebpackHotPlugin {

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

}

export default HapiWebpackHotPlugin;
4 changes: 1 addition & 3 deletions src/stores/IAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import {Action} from 'redux';
/**
* https://github.com/acdlite/flux-standard-action
*/
interface IAction<T> extends Action<string> {
export default interface IAction<T> extends Action<string> {
type: string;
payload?: T;
error?: boolean;
meta?: any;
}

export default IAction;
4 changes: 1 addition & 3 deletions src/stores/ISagaStore.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import IStore from './IStore';

interface ISagaStore extends IStore {
export default interface ISagaStore extends IStore {
runSaga: any; // TODO: figure out type
endSaga: any; // TODO: figure out type
}

export default ISagaStore;
4 changes: 1 addition & 3 deletions src/stores/IStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import IUserReducerState from './user/IUserReducerState';
import IRenderReducerState from './render/IRenderReducerState';
import IModalReducerState from './modal/IModalReducerState';

interface IStore extends Store<IStore> {
export default interface IStore extends Store<IStore> {
readonly form: FormReducer;
readonly loadingReducer: ILoadingReducerState;
readonly metaReducer: IMetaReducerState;
Expand All @@ -16,5 +16,3 @@ interface IStore extends Store<IStore> {
readonly userReducer: IUserReducerState;
readonly router: RouterState;
}

export default IStore;
4 changes: 1 addition & 3 deletions src/stores/loading/ILoadingReducerState.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
interface ILoadingReducerState {
export default interface ILoadingReducerState {
readonly isLoading: boolean;
}

export default ILoadingReducerState;
4 changes: 1 addition & 3 deletions src/stores/loading/LoadingAction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IAction from '../IAction';

class LoadingAction {
export default class LoadingAction {

public static readonly SET_LOADING: string = 'LoadingAction.SET_LOADING';

Expand All @@ -12,5 +12,3 @@ class LoadingAction {
}

}

export default LoadingAction;
4 changes: 1 addition & 3 deletions src/stores/loading/LoadingReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import LoadingAction from './LoadingAction';
import ILoadingReducerState from './ILoadingReducerState';
import IAction from '../IAction';

class LoadingReducer {
export default class LoadingReducer {

private static readonly _initialState: ILoadingReducerState = {
isLoading: false,
Expand All @@ -25,5 +25,3 @@ class LoadingReducer {
}

}

export default LoadingReducer;
4 changes: 1 addition & 3 deletions src/stores/meta/IMetaReducerState.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
interface IMetaReducerState {
export default interface IMetaReducerState {
readonly title: string;
readonly description?: string;
}

export default IMetaReducerState;
4 changes: 1 addition & 3 deletions src/stores/meta/MetaAction.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import IMetaReducerState from './IMetaReducerState';
import IAction from '../IAction';

class MetaAction {
export default class MetaAction {

public static readonly SET_META: string = 'MetaAction.SET_META';

Expand All @@ -17,5 +17,3 @@ class MetaAction {
}

}

export default MetaAction;
4 changes: 1 addition & 3 deletions src/stores/meta/MetaReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import IMetaReducerState from './IMetaReducerState';
import IAction from '../IAction';
import ITitleDescription from './models/ITitleDescription';

class MetaReducer {
export default class MetaReducer {

private static readonly _initialState: IMetaReducerState = {
title: 'Robert is cool',
Expand All @@ -28,5 +28,3 @@ class MetaReducer {
}

}

export default MetaReducer;
4 changes: 1 addition & 3 deletions src/stores/modal/IModalReducerState.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
interface IModalReducerState {
export default interface IModalReducerState {
readonly currentModal: JSX.Element;
readonly modals: JSX.Element[];
}

export default IModalReducerState;
4 changes: 1 addition & 3 deletions src/stores/modal/ModalAction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IAction from '../IAction';

class ModalAction {
export default class ModalAction {

public static readonly ADD_MODAL: string = 'ModalAction.ADD_MODAL';
public static readonly REMOVE_MODAL: string = 'ModalAction.REMOVE_MODAL';
Expand All @@ -19,5 +19,3 @@ class ModalAction {
}

}

export default ModalAction;
4 changes: 1 addition & 3 deletions src/stores/modal/ModalReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ModalAction from './ModalAction';
import IModalReducerState from './IModalReducerState';
import IAction from '../IAction';

class ModalReducer {
export default class ModalReducer {

private static readonly _initialState: IModalReducerState = {
currentModal: null,
Expand Down Expand Up @@ -45,5 +45,3 @@ class ModalReducer {
}

}

export default ModalReducer;
4 changes: 1 addition & 3 deletions src/stores/render/IRenderReducerState.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {IServerLocation} from '../../server/utilities/ServerUtility';

interface IRenderReducerState {
export default interface IRenderReducerState {
readonly isServerSide: boolean;
readonly serverSideLocation: IServerLocation;
}

export default IRenderReducerState;
4 changes: 1 addition & 3 deletions src/stores/render/RenderReducer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import IRenderReducerState from './IRenderReducerState';
import IAction from '../IAction';

class RenderReducer {
export default class RenderReducer {

private static readonly _initialState: IRenderReducerState = {
isServerSide: true,
Expand All @@ -13,5 +13,3 @@ class RenderReducer {
}

}

export default RenderReducer;
4 changes: 1 addition & 3 deletions src/stores/user/IUserReducerState.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface IUserReducerState {
export default interface IUserReducerState {
readonly name: {
title: string;
first: string;
Expand All @@ -17,5 +17,3 @@ interface IUserReducerState {
thumbnail: string;
};
}

export default IUserReducerState;
4 changes: 1 addition & 3 deletions src/stores/user/UserAction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IAction from '../IAction';

class UserAction {
export default class UserAction {

public static readonly LOAD_USER: string = 'UserAction.LOAD_USER';
public static readonly LOAD_USER_SUCCESS: string = 'UserAction.LOAD_USER_SUCCESS';
Expand All @@ -13,5 +13,3 @@ class UserAction {
}

}

export default UserAction;
4 changes: 1 addition & 3 deletions src/stores/user/UserReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import UserAction from './UserAction';
import IUserReducerState from './IUserReducerState';
import IAction from '../IAction';

class UserReducer {
export default class UserReducer {

private static readonly _initialState: IUserReducerState = {
name: {
Expand Down Expand Up @@ -41,5 +41,3 @@ class UserReducer {
}

}

export default UserReducer;
4 changes: 1 addition & 3 deletions src/stores/user/UserSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import LoadingAction from '../loading/LoadingAction';
import IAction from '../IAction';
import IUserReducerState from './IUserReducerState';

class UserSaga {
export default class UserSaga {

public static* loadUser(action: IAction<void> = null) {
yield put({
Expand Down Expand Up @@ -37,5 +37,3 @@ class UserSaga {
}

}

export default UserSaga;
4 changes: 1 addition & 3 deletions src/utilities/ProviderUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import rootSaga from '../stores/rootSaga';
import IStore from '../stores/IStore';
import ISagaStore from '../stores/ISagaStore';

class ProviderUtility {
export default class ProviderUtility {

public static createProviderStore(initialState: Partial<IStore> = {}, history: History = null, isServerSide: boolean = false): ISagaStore {
const sagaMiddleware: SagaMiddleware<any> = createSagaMiddleware();
Expand All @@ -35,5 +35,3 @@ class ProviderUtility {
}

}

export default ProviderUtility;
4 changes: 1 addition & 3 deletions src/utilities/ServerUtility.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Hapi from 'hapi';

class ServerUtility {
export default class ServerUtility {

public static createLocationObject(request: Hapi.Request): any {
const protocol: string = request.headers['x-forwarded-proto'];
Expand All @@ -17,5 +17,3 @@ class ServerUtility {
}

}

export default ServerUtility;
4 changes: 1 addition & 3 deletions src/views/components/InputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface IProps {
}
interface IState {}

class InputField extends React.Component<IProps, IState> {
export default class InputField extends React.Component<IProps, IState> {

public static defaultProps: Partial<IProps> = {
type: 'text',
Expand Down Expand Up @@ -59,5 +59,3 @@ class InputField extends React.Component<IProps, IState> {
}

}

export default InputField;
4 changes: 1 addition & 3 deletions src/views/contact/IContactForm.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
interface IContactForm {
export default interface IContactForm {
name: string;
email: string;
message: string;
exampleSelect1: string;
codeQualityRadio: string;
starred: string;
}

export default IContactForm;
4 changes: 1 addition & 3 deletions src/views/landmarks/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
interface IProps {}
interface IState {}

class Footer extends React.PureComponent<IProps, IState> {
export default class Footer extends React.PureComponent<IProps, IState> {

public render(): JSX.Element {
return (
Expand All @@ -14,5 +14,3 @@ class Footer extends React.PureComponent<IProps, IState> {
}

}

export default Footer;
4 changes: 1 addition & 3 deletions src/views/landmarks/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {NavLink} from 'react-router-dom';
interface IProps {}
interface IState {}

class Header extends React.Component<IProps, IState> {
export default class Header extends React.Component<IProps, IState> {

public render(): JSX.Element {
return (
Expand Down Expand Up @@ -47,5 +47,3 @@ class Header extends React.Component<IProps, IState> {
}

}

export default Header;