ing
This commit is contained in:
parent
501e1e04b7
commit
820e57f555
|
@ -30,7 +30,6 @@
|
||||||
"@types/react-redux": "^4.4.45",
|
"@types/react-redux": "^4.4.45",
|
||||||
"@types/react-router": "^4.0.12",
|
"@types/react-router": "^4.0.12",
|
||||||
"@types/react-router-dom": "^4.0.5",
|
"@types/react-router-dom": "^4.0.5",
|
||||||
"@types/react-router-redux": "^5.0.3",
|
|
||||||
"@types/react-tap-event-plugin": "^0.0.30",
|
"@types/react-tap-event-plugin": "^0.0.30",
|
||||||
"@types/redux": "^3.6.0",
|
"@types/redux": "^3.6.0",
|
||||||
"awesome-typescript-loader": "^3.1.3",
|
"awesome-typescript-loader": "^3.1.3",
|
||||||
|
|
|
@ -34,14 +34,14 @@ function* app(): any {
|
||||||
|
|
||||||
sagaMiddleware.run(sagas);
|
sagaMiddleware.run(sagas);
|
||||||
|
|
||||||
ReactDOM.render(
|
// ReactDOM.render(
|
||||||
<Provider store={store}>
|
// <Provider store={store}>
|
||||||
<ConnectedRouter history={history}>
|
// <ConnectedRouter history={history}>
|
||||||
{routes}
|
// {routes}
|
||||||
</ConnectedRouter>
|
// </ConnectedRouter>
|
||||||
</Provider>,
|
// </Provider>,
|
||||||
appContainer,
|
// appContainer,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
sagaMiddleware.run(app);
|
sagaMiddleware.run(app);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Route, Switch } from 'react-router-dom';
|
import { Route, Switch } from 'react-router-dom';
|
||||||
|
|
||||||
import Signin from '../views/member/Signin';
|
import SignIn from '../views/member/SignIn';
|
||||||
|
|
||||||
const routes = (
|
const routes = (
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact path='/' />
|
<Route exact path='/' />
|
||||||
<Route path='/signin' component={Signin} />
|
<Route path='/signin' component={SignIn} />
|
||||||
|
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { RouteComponentProps } from 'react-router';
|
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> {
|
class Signin extends React.Component<RouteComponentProps<object>, object> {
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<SigninContainer/>
|
<SignInContainer/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
import { inject } from 'inversify';
|
import inject from '../context/inject';
|
||||||
import WebSocketRPC from '../websocket/WebSocketRPC';
|
import WebSocketRPC from '../websocket/WebSocketRPC';
|
||||||
|
|
||||||
abstract class Service {
|
abstract class Service {
|
||||||
|
@ -7,6 +7,7 @@ abstract class Service {
|
||||||
private name: string;
|
private name: string;
|
||||||
protected constructor(name: string) {
|
protected constructor(name: string) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected send(methodName: string, ...params: any[]): Promise<string> {
|
protected send(methodName: string, ...params: any[]): Promise<string> {
|
||||||
|
|
|
@ -2,14 +2,10 @@
|
||||||
import * as METADATA from './constants';
|
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 => {
|
return (target: Object, propertyKey: string | symbol, parameterIndex?: number): void => {
|
||||||
let metadata = new Metadata(METADATA.INJECT_TAG, serviceIdentifier);
|
console.log('');
|
||||||
|
|
||||||
if (typeof parameterIndex === 'number') {
|
|
||||||
tagParameter(target, propertyKey, parameterIndex, metadata);
|
|
||||||
} else {
|
|
||||||
tagProperty(target, propertyKey, metadata);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
|
export default inject;
|
||||||
|
|
|
@ -13,3 +13,5 @@ function injectable(): ClassDecorator {
|
||||||
return target;
|
return target;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default injectable;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import Service from '@overflow/commons/api/Service';
|
import Service from '@overflow/commons/api/Service';
|
||||||
import Member from '../model/Member';
|
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 {
|
export class MemberService extends Service {
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"baseUrl": "./src/ts",
|
"baseUrl": "src/ts",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
"dom",
|
"dom",
|
||||||
"es6"
|
"es6"
|
||||||
],
|
],
|
||||||
"module": "umd",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"newLine": "LF",
|
"newLine": "LF",
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
"node_modules/@types",
|
"node_modules/@types",
|
||||||
"types"
|
"types"
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/ts/**/*"
|
"src/ts/**/*"
|
||||||
|
@ -36,7 +37,6 @@
|
||||||
"build",
|
"build",
|
||||||
"config",
|
"config",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"public",
|
"public"
|
||||||
"types"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user