This commit is contained in:
crusader 2017-07-19 14:06:43 +09:00
parent 501e1e04b7
commit 820e57f555
11 changed files with 27 additions and 29 deletions

View File

@ -30,7 +30,6 @@
"@types/react-redux": "^4.4.45",
"@types/react-router": "^4.0.12",
"@types/react-router-dom": "^4.0.5",
"@types/react-router-redux": "^5.0.3",
"@types/react-tap-event-plugin": "^0.0.30",
"@types/redux": "^3.6.0",
"awesome-typescript-loader": "^3.1.3",

View File

@ -34,14 +34,14 @@ function* app(): any {
sagaMiddleware.run(sagas);
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
{routes}
</ConnectedRouter>
</Provider>,
appContainer,
);
// ReactDOM.render(
// <Provider store={store}>
// <ConnectedRouter history={history}>
// {routes}
// </ConnectedRouter>
// </Provider>,
// appContainer,
// );
}
sagaMiddleware.run(app);

View File

@ -1,12 +1,12 @@
import * as React from 'react';
import { Route, Switch } from 'react-router-dom';
import Signin from '../views/member/Signin';
import SignIn from '../views/member/SignIn';
const routes = (
<Switch>
<Route exact path='/' />
<Route path='/signin' component={Signin} />
<Route path='/signin' component={SignIn} />
</Switch>

View File

@ -1,11 +1,11 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import SigninContainer from '@overflow/member/react/Signin';
import SignInContainer from '@overflow/member/react/SignIn';
class Signin extends React.Component<RouteComponentProps<object>, object> {
public render(): JSX.Element {
return (
<SigninContainer/>
<SignInContainer/>
);
}
}

View File

@ -1,4 +1,4 @@
import { inject } from 'inversify';
import inject from '../context/inject';
import WebSocketRPC from '../websocket/WebSocketRPC';
abstract class Service {
@ -7,6 +7,7 @@ abstract class Service {
private name: string;
protected constructor(name: string) {
this.name = name;
}
protected send(methodName: string, ...params: any[]): Promise<string> {

View File

@ -2,14 +2,10 @@
import * as METADATA from './constants';
function inject(): PropertyDecorator | ParameterDecorator {
const inject = <TFunction extends Function>(type: TFunction) => {
return (target: Object, propertyKey: string | symbol, parameterIndex?: number): void => {
let metadata = new Metadata(METADATA.INJECT_TAG, serviceIdentifier);
if (typeof parameterIndex === 'number') {
tagParameter(target, propertyKey, parameterIndex, metadata);
} else {
tagProperty(target, propertyKey, metadata);
}
console.log('');
};
}
};
export default inject;

View File

@ -13,3 +13,5 @@ function injectable(): ClassDecorator {
return target;
};
}
export default injectable;

View File

@ -1,10 +1,10 @@
import Service from '@overflow/commons/api/Service';
import Member from '../model/Member';
// import service from '@overflow/commons/context/decorator/service';
import injectable from '@overflow/commons/context/injectable';
@service()
@injectable()
export class MemberService extends Service {
public constructor() {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": "./src/ts",
"baseUrl": "src/ts",
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
@ -10,7 +10,7 @@
"dom",
"es6"
],
"module": "umd",
"module": "commonjs",
"moduleResolution": "node",
"newLine": "LF",
"noImplicitAny": false,
@ -28,6 +28,7 @@
"node_modules/@types",
"types"
]
},
"include": [
"src/ts/**/*"
@ -36,7 +37,6 @@
"build",
"config",
"node_modules",
"public",
"types"
"public"
]
}