diff --git a/.eslintrc.js b/.eslintrc.js index 6cc0dcf..2b5c539 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -231,7 +231,7 @@ module.exports = { */ // 'typescript/no-constant-condition': 2, - 'typescript/quotemark': [true,"single","avoid-escape","jsx-double"], + 'typescript/quotemark': [true, 'single', 'avoid-escape', 'jsx-double'], 'typescript/no-console': 0, 'typescript/ordered-imports': 0, 'typescript/no-namespace': 0, @@ -259,8 +259,8 @@ module.exports = { // "public-instence-method" // ] // }], - 'typescript/object-literal-key-quotes': [true,"as-needed"], - 'typescript/no-trailing-whitespace': [false,"ignore-comments"], + 'typescript/object-literal-key-quotes': [true, 'as-needed'], + 'typescript/no-trailing-whitespace': [false, 'ignore-comments'], 'typescript/class-name-casing': 2, /** @@ -274,6 +274,8 @@ module.exports = { 'react/jsx-sort-prop-types': 0, // 是否排序 prop types 'react/jsx-uses-react': 2, // 组件中中是否用了 react 'react/jsx-uses-vars': 2, // 定义了 jsx component 没有使用 + 'react/jsx-pascal-case': 1, // 使用jsx作为组件扩展名,采用pascal命名法 引用名采用驼峰命名 + 'react/jsx-closing-bracket-location': 1, // 组件prop的的对齐风格 'react/no-did-mount-set-state': 0, // 不要在 componentDidMount 里面设置 state 'react/no-did-update-set-state': 0, // 同上 'react/no-multi-comp': 0, // 一个文件里面禁止声明多个 component @@ -282,6 +284,7 @@ module.exports = { 'react/react-in-jsx-scope': 1, // 查看 jsx 是否引入 react 'react/self-closing-comp': 2, // 检查是否有没有 children 的非子闭合标签 'react/jsx-wrap-multilines': 1, // 不强制 return 的时候,结构的格式 + 'react/prefer-es6-class': 1, // 使用组件类继承React.Component 'react/sort-comp': [ 0, { @@ -298,8 +301,6 @@ module.exports = { ], 'react/jsx-indent-props': 0, - - 'no-var':0 + 'no-var': 0, }, - }; diff --git a/.umirc.js b/.umirc.js index fc17709..f2d8952 100644 --- a/.umirc.js +++ b/.umirc.js @@ -2,14 +2,13 @@ import path from 'path'; - export default { plugins: [ // ref: https://umijs.org/plugin/umi-plugin-react.html [ 'umi-plugin-react', { - antd: false, + antd: true, dva: true, dynamicImport: true, title: 'umi-ts', @@ -23,6 +22,9 @@ export default { ], history: 'hash', cssLoaderOptions: {}, + alias: { + component: path.resolve(__dirname, './src/component'), + }, chainWebpack(config, { webpack }) { // config.plugin('analyzer').use( // new BundleAnalyzerPlugin({ @@ -57,6 +59,8 @@ export default { // }) // ); config.resolve.alias.set('src', path.resolve(__dirname, './src')); + config.resolve.alias.set('component', path.resolve(__dirname, './src/component')); + config.resolve.alias.set('assets', path.resolve(__dirname, './src/assets')); // config.module // .rule('save') // .test(/\.less$/) diff --git a/src/assets/css/common/index.less b/src/assets/css/common/index.less new file mode 100644 index 0000000..6689b57 --- /dev/null +++ b/src/assets/css/common/index.less @@ -0,0 +1,2 @@ +@header-nav-color: #40aea8; +@footer-border-color: #40aea8; diff --git a/src/assets/images/home/Github@2x.png b/src/assets/images/home/Github@2x.png new file mode 100644 index 0000000..df04d8b Binary files /dev/null and b/src/assets/images/home/Github@2x.png differ diff --git a/src/assets/images/home/android@2x.png b/src/assets/images/home/android@2x.png new file mode 100644 index 0000000..e729e0e Binary files /dev/null and b/src/assets/images/home/android@2x.png differ diff --git a/src/assets/images/home/bg@2x(1).png b/src/assets/images/home/bg@2x(1).png new file mode 100644 index 0000000..00ef3d6 Binary files /dev/null and b/src/assets/images/home/bg@2x(1).png differ diff --git a/src/assets/images/home/ios@2x.png b/src/assets/images/home/ios@2x.png new file mode 100644 index 0000000..63791fd Binary files /dev/null and b/src/assets/images/home/ios@2x.png differ diff --git a/src/assets/images/home/logo.png b/src/assets/images/home/logo.png new file mode 100644 index 0000000..90df0d5 Binary files /dev/null and b/src/assets/images/home/logo.png differ diff --git a/src/assets/images/home/logo@2x.png b/src/assets/images/home/logo@2x.png new file mode 100644 index 0000000..1f24834 Binary files /dev/null and b/src/assets/images/home/logo@2x.png differ diff --git a/src/assets/images/home/search@2x.png b/src/assets/images/home/search@2x.png new file mode 100644 index 0000000..f5a4152 Binary files /dev/null and b/src/assets/images/home/search@2x.png differ diff --git a/src/assets/images/home/wb-icon@2x.png b/src/assets/images/home/wb-icon@2x.png new file mode 100644 index 0000000..8f01ad1 Binary files /dev/null and b/src/assets/images/home/wb-icon@2x.png differ diff --git a/src/assets/images/home/wx-icon@2x.png b/src/assets/images/home/wx-icon@2x.png new file mode 100644 index 0000000..12f1acf Binary files /dev/null and b/src/assets/images/home/wx-icon@2x.png differ diff --git a/src/assets/images/login/github-icon.png b/src/assets/images/login/github-icon.png new file mode 100644 index 0000000..36384d4 Binary files /dev/null and b/src/assets/images/login/github-icon.png differ diff --git a/src/assets/images/login/github-icon@2x.png b/src/assets/images/login/github-icon@2x.png new file mode 100644 index 0000000..75e16b3 Binary files /dev/null and b/src/assets/images/login/github-icon@2x.png differ diff --git a/src/assets/images/login/loginbg.png b/src/assets/images/login/loginbg.png new file mode 100644 index 0000000..b421809 Binary files /dev/null and b/src/assets/images/login/loginbg.png differ diff --git a/src/assets/images/login/logo.png b/src/assets/images/login/logo.png new file mode 100644 index 0000000..195e1bb Binary files /dev/null and b/src/assets/images/login/logo.png differ diff --git a/src/assets/images/login/logo@2x.png b/src/assets/images/login/logo@2x.png new file mode 100644 index 0000000..3e6c4e1 Binary files /dev/null and b/src/assets/images/login/logo@2x.png differ diff --git "a/src/assets/images/login/\345\276\256\344\277\241-icon.png" "b/src/assets/images/login/\345\276\256\344\277\241-icon.png" new file mode 100644 index 0000000..805bbe8 Binary files /dev/null and "b/src/assets/images/login/\345\276\256\344\277\241-icon.png" differ diff --git "a/src/assets/images/login/\345\276\256\344\277\241-icon@2x.png" "b/src/assets/images/login/\345\276\256\344\277\241-icon@2x.png" new file mode 100644 index 0000000..f24fd27 Binary files /dev/null and "b/src/assets/images/login/\345\276\256\344\277\241-icon@2x.png" differ diff --git "a/src/assets/images/login/\345\276\256\345\215\232-icon.png" "b/src/assets/images/login/\345\276\256\345\215\232-icon.png" new file mode 100644 index 0000000..35fda07 Binary files /dev/null and "b/src/assets/images/login/\345\276\256\345\215\232-icon.png" differ diff --git "a/src/assets/images/login/\345\276\256\345\215\232-icon@2x.png" "b/src/assets/images/login/\345\276\256\345\215\232-icon@2x.png" new file mode 100644 index 0000000..86595cc Binary files /dev/null and "b/src/assets/images/login/\345\276\256\345\215\232-icon@2x.png" differ diff --git "a/src/assets/images/login/\351\227\255\347\234\274-icon.png" "b/src/assets/images/login/\351\227\255\347\234\274-icon.png" new file mode 100644 index 0000000..55cd04e Binary files /dev/null and "b/src/assets/images/login/\351\227\255\347\234\274-icon.png" differ diff --git "a/src/assets/images/login/\351\227\255\347\234\274-icon@2x.png" "b/src/assets/images/login/\351\227\255\347\234\274-icon@2x.png" new file mode 100644 index 0000000..0e67a77 Binary files /dev/null and "b/src/assets/images/login/\351\227\255\347\234\274-icon@2x.png" differ diff --git a/src/component/common/BasicFooter/index.less b/src/component/common/BasicFooter/index.less new file mode 100644 index 0000000..ffeb477 --- /dev/null +++ b/src/component/common/BasicFooter/index.less @@ -0,0 +1,57 @@ +@import url('../../../assets/css/common/index'); + +.cr-footer { + width: 100%; + height: 390px; + border-top: 4px solid @footer-border-color; + background: #fff; + font-family: 'Microsoft YaHei UI'; + font-weight: bold; + display: flex; + :global { + .cr-footer-left { + width: 835px; + padding-right: 100px; + text-align: left; + font-size: 18px; + flex-shrink: 0; + > p { + margin: 0; + } + > p:last-child { + font-size: 20px; + margin-top: 20px; + } + .cr-footer-logo { + margin-top: 60px; + margin-bottom: 30px; + img { + width: 214px; + height: 50px; + } + } + } + .cr-footer-right { + text-align: left; + font-weight: normal; + .cr-friendly-link-title { + font-size: 40px; + margin-top: 60px; + line-height: 50px; + margin-bottom: 30px; + } + .cr-friendly-link { + font-size: 20px; + > ul { + list-style: none; + margin: 0; + padding: 0; + li { + float: left; + margin-right: 20px; + } + } + } + } + } +} diff --git a/src/component/common/BasicFooter/index.tsx b/src/component/common/BasicFooter/index.tsx new file mode 100644 index 0000000..d1c2843 --- /dev/null +++ b/src/component/common/BasicFooter/index.tsx @@ -0,0 +1,54 @@ +import React, { Component } from 'react'; +import styles from './index.less'; +import logo from 'assets/images/home/logo@2x.png'; +import android from 'assets/images/home/android@2x.png'; +import ios from 'assets/images/home/ios@2x.png'; +import github from 'assets/images/home/Github@2x.png'; +import wbicon from 'assets/images/home/wb-icon@2x.png'; +import wxicon from 'assets/images/home/wx-icon@2x.png'; + +export default class BasicFooter extends Component { + render() { + return ( + + ); + } +} diff --git a/src/component/common/BasicHeader/index.less b/src/component/common/BasicHeader/index.less new file mode 100644 index 0000000..db8b035 --- /dev/null +++ b/src/component/common/BasicHeader/index.less @@ -0,0 +1,52 @@ +@import '../../../assets/css/common/index'; +.cr-header { + width: 100%; + display: flex; + height: 80px; + :global { + .cr-logo { + flex-shrink: 0; + img { + width: 214px; + height: 50px; + margin: 10px 20px 20px; + } + } + .cr-nav { + flex: 1; + margin-bottom: 8px; + align-self: center; + overflow: hidden; + } + .cr-user { + flex-shrink: 0; + font-size: 20px; + line-height: 80px; + > span, + > i { + margin: 0 15px; + } + > i { + font-weight: bold; + } + } + .ant-menu-item { + font-size: 20px; + color: #000; + line-height: 68px; + margin: 0 10px; + border-bottom: 4px solid transparent; + } + .ant-menu-item-selected, + .ant-menu-item:hover { + border-bottom: 4px solid @header-nav-color; + color: #000000; + } + .ant-menu-item-active .ant-menu-item-selected { + border-bottom: 4px solid @header-nav-color; + } + .ant-menu-horizontal { + border: none; + } + } +} diff --git a/src/component/common/BasicHeader/index.tsx b/src/component/common/BasicHeader/index.tsx new file mode 100644 index 0000000..b3acd2a --- /dev/null +++ b/src/component/common/BasicHeader/index.tsx @@ -0,0 +1,55 @@ +import React, { Component } from 'react'; +import styles from './index.less'; +import { Menu, Icon } from 'antd'; +import logo from 'assets/images/home/logo@2x.png'; +import router from 'umi/router'; + +export default class BasicHeader extends Component { + state = { + current: 'home', + }; + + handleClick = e => { + console.log('click ', e); + this.setState({ + current: e.key, + }); + }; + + render() { + const Nav = props => ( + + 首页 + 项目中心 + 人才广场 + + ); + return ( +
+
+ +
+
+
+
+ + { + router.push('/user'); + }} + > + 登录 + + { + router.push('/user'); + }} + > + 注册 + +
+
+ ); + } +} diff --git a/src/component/home/HomeTitle/index.less b/src/component/home/HomeTitle/index.less new file mode 100644 index 0000000..87951f0 --- /dev/null +++ b/src/component/home/HomeTitle/index.less @@ -0,0 +1,17 @@ +.cr-home-title { + width: 100%; + display: flex; + justify-content: space-between; + :global { + .cr-home-title-text { + font-size: 40px; + height: 140px; + text-align: left; + line-height: 140px; + } + .cr-home-title-more { + font-size: 30px; + line-height: 140px; + } + } +} diff --git a/src/component/home/HomeTitle/index.tsx b/src/component/home/HomeTitle/index.tsx new file mode 100644 index 0000000..31486b8 --- /dev/null +++ b/src/component/home/HomeTitle/index.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import router from 'umi/router'; +import styles from './index.less'; + +type HomeTitleProps = { + title: string; + path?: string; + color?: string; +}; + +export default function(props: HomeTitleProps) { + return ( +
+
{props.title}
+
+ { + router.push(props.path); + }} + > + {props.path ? '查看更多' : ''} + +
+
+ ); +} diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 0000000..1918cc7 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,2 @@ +declare module '*.png'; +declare module 'component/*'; diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less deleted file mode 100644 index fe786cb..0000000 --- a/src/layouts/BasicLayout.less +++ /dev/null @@ -1,14 +0,0 @@ -.normal { - font-family: Georgia, sans-serif; - text-align: center; -} - -.title { - font-size: 2.5rem; - font-weight: normal; - letter-spacing: -1px; - background: darkslateblue; - padding: 0.6em 0; - color: white; - margin: 0; -} diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx deleted file mode 100644 index 3732a06..0000000 --- a/src/layouts/BasicLayout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import styles from './BasicLayout.less'; -import { ComProps } from '../type/displayType'; - -// const styles = require('./BasicLayout'); - -export default function BasicLayout(props: ComProps) { - return ( -
-

Yay! Welcome to umi!

- {props.children} -
- ); -} diff --git a/src/layouts/BasicLayout/index.less b/src/layouts/BasicLayout/index.less new file mode 100644 index 0000000..0d014c4 --- /dev/null +++ b/src/layouts/BasicLayout/index.less @@ -0,0 +1,34 @@ +.normal { + font-family: Georgia, sans-serif; + text-align: center; +} + +.title { + font-size: 2.5rem; + font-weight: normal; + letter-spacing: -1px; + background: darkslateblue; + padding: 0.6em 0; + color: white; + margin: 0; +} + +.cr-base { + width: 100%; + //background: #ccc; + min-height: 100vh; + :global { + .cr-main { + width: 1220px; + margin: 0 auto; + background: #ffffff; + height: 100%; + min-width: 1220px; + } + @media (max-width: 1220px) { + .cr-main { + width: 100%; + } + } + } +} diff --git a/src/layouts/BasicLayout/index.tsx b/src/layouts/BasicLayout/index.tsx new file mode 100644 index 0000000..c1d4093 --- /dev/null +++ b/src/layouts/BasicLayout/index.tsx @@ -0,0 +1,16 @@ +import styles from './index.less'; +import { ComProps } from 'src/type/common'; +import BasicHeader from 'component/common/BasicHeader/'; +import BasicFooter from 'component/common/BasicFooter/'; + +export default function Index(props: ComProps) { + return ( +
+
+ + {props.children} + +
+
+ ); +} diff --git a/src/layouts/DisplayLayout.tsx b/src/layouts/DisplayLayout/index.tsx similarity index 58% rename from src/layouts/DisplayLayout.tsx rename to src/layouts/DisplayLayout/index.tsx index 93bea06..61e4bfa 100644 --- a/src/layouts/DisplayLayout.tsx +++ b/src/layouts/DisplayLayout/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { ComProps } from '../type/displayType'; +import { ComProps } from '../../type/common'; -export default function DisplayLayout(props: ComProps) { +export default function Index(props: ComProps) { // console.log(props); return (
diff --git a/src/layouts/GlobalLayout.tsx b/src/layouts/GlobalLayout.tsx deleted file mode 100644 index 8a1cd71..0000000 --- a/src/layouts/GlobalLayout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import styles from './BasicLayout.less'; -import { ComProps } from '../type/displayType'; -// import MuiThemeProvider from 'material-ui' - -// const styles = require('./BasicLayout'); - -export default function GlobalLayout(props: ComProps) { - return
我是全局layout{props.children}
; -} diff --git a/src/layouts/GlobalLayout/index.tsx b/src/layouts/GlobalLayout/index.tsx new file mode 100644 index 0000000..c2c2f3e --- /dev/null +++ b/src/layouts/GlobalLayout/index.tsx @@ -0,0 +1,9 @@ +import styles from '../BasicLayout/index.less'; +import { ComProps } from '../../type/common'; +// import MuiThemeProvider from 'material-ui' + +// const styles = require('./Index'); + +export default function Index(props: ComProps) { + return
{props.children}
; +} diff --git a/src/layouts/LoginLayout/index.tsx b/src/layouts/LoginLayout/index.tsx new file mode 100644 index 0000000..9121969 --- /dev/null +++ b/src/layouts/LoginLayout/index.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import loginbg from 'assets/images/login/loginbg.png'; + +export default function LoginLayout(props) { + return ( +
+ {props.children} +
+ ); +} diff --git a/src/layouts/TestLayout.tsx b/src/layouts/TestLayout.tsx index 8f2847b..a32b80f 100644 --- a/src/layouts/TestLayout.tsx +++ b/src/layouts/TestLayout.tsx @@ -1,4 +1,4 @@ -import { ComProps } from '../type/displayType'; +import { ComProps } from '../type/common'; export default function TestLayout(props: ComProps) { console.log(props); diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 6814974..d64f7b9 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -1,20 +1,29 @@ -import BasicLayout from './BasicLayout'; -import DisplayLayout from './DisplayLayout'; -import GlobalLayout from './GlobalLayout'; -import './BasicLayout.less'; -import { ComProps } from '../type/displayType'; +import React from 'react'; +import BasicLayout from './BasicLayout/'; +import DisplayLayout from './DisplayLayout/'; +import GlobalLayout from './GlobalLayout/'; +import LoginLayout from './LoginLayout/'; +import './BasicLayout/index.less'; +import { ComProps } from '../type/common'; import { isNull } from 'util'; export default function(props: ComProps) { const firstLevenPath = getSinglePath(props.location.pathname); + console.log(firstLevenPath); let ChlLayout = null; switch (firstLevenPath) { case 'display': ChlLayout = () => {props.children}; break; - case 'test': + case 'coderiver': ChlLayout = () => {props.children}; break; + case 'user': + ChlLayout = () => {props.children}; + break; + default: + ChlLayout = null; + break; } return ( @@ -26,5 +35,9 @@ export default function(props: ComProps) { // 根据路由名称获取不同等级的路由 export function getSinglePath(pathname = '/', level = 1) { const pathArr = pathname.split('/')[level]; - if (pathArr) return pathArr; + if (pathArr) { + return pathArr; + } else { + return null; + } } diff --git a/src/models/globalModel.tsx b/src/models/globalModel.tsx index c07ffd3..3635ff8 100644 --- a/src/models/globalModel.tsx +++ b/src/models/globalModel.tsx @@ -1,4 +1,4 @@ -import { Model } from 'src/typing'; +import { Model } from 'src/type/model'; type S = { test: number; @@ -19,7 +19,7 @@ export default ((): Model => { }, effects: { - *fetch({ payload, callback }, { call, put }) { + * fetch({ payload, callback }, { call, put }) { // eslint-disable-line yield put({ type: 'save' }); if (callback) callback(); diff --git a/src/pages/coderiver/index.tsx b/src/pages/coderiver/index.tsx new file mode 100644 index 0000000..3225dfd --- /dev/null +++ b/src/pages/coderiver/index.tsx @@ -0,0 +1,18 @@ +import React, { Component } from 'react'; +import HomeTitle from 'component/home/HomeTitle'; +import bgimg from 'assets/images/home/bg@2x(1).png'; + +export default class Home extends Component { + render() { + return ( +
+ + + + + + +
+ ); + } +} diff --git a/src/pages/display/models/displayModel.tsx b/src/pages/display/models/displayModel.tsx index b82fbed..7ec84b7 100644 --- a/src/pages/display/models/displayModel.tsx +++ b/src/pages/display/models/displayModel.tsx @@ -1,4 +1,4 @@ -import { Model } from 'src/typing'; +import { Model } from 'src/type/model'; import { queryTest } from 'src/pages/display/service/displayService'; // type S = { @@ -20,7 +20,7 @@ export default ((): Model => { }, effects: { - *fetch({ payload, callback }, { call, put }) { + * fetch({ payload, callback }, { call, put }) { // eslint-disable-line const res = yield call(queryTest); console.log(res); diff --git a/src/pages/document.ejs b/src/pages/document.ejs index 0af7523..931e4b0 100644 --- a/src/pages/document.ejs +++ b/src/pages/document.ejs @@ -2,11 +2,12 @@ - Umi+Dva+Ts - - + 河码-CodeRiver + +
+ diff --git a/src/pages/exception/403.tsx b/src/pages/exception/403.tsx index 41af7bb..cd5da59 100644 --- a/src/pages/exception/403.tsx +++ b/src/pages/exception/403.tsx @@ -1,4 +1,4 @@ -import { ComProps } from 'src/type/displayType'; +import { ComProps } from 'src/type/common'; export default function Com403(props: ComProps) { return ( diff --git a/src/pages/exception/404.tsx b/src/pages/exception/404.tsx index aff3d39..9eadccb 100644 --- a/src/pages/exception/404.tsx +++ b/src/pages/exception/404.tsx @@ -1,4 +1,4 @@ -import { ComProps } from 'src/type/displayType'; +import { ComProps } from 'src/type/common'; export default function Com404(props: ComProps) { return ( diff --git a/src/pages/exception/500.tsx b/src/pages/exception/500.tsx index 7d81798..cff035e 100644 --- a/src/pages/exception/500.tsx +++ b/src/pages/exception/500.tsx @@ -1,4 +1,4 @@ -import { ComProps } from 'src/type/displayType'; +import { ComProps } from 'src/type/common'; export default function Com500(props: ComProps) { return ( diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 8cd013c..b49d063 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,10 +1,20 @@ +/** + * 注释路由 + * title: Index Page + * Routes: + * - ./src/pages/display/index.tsx + */ + import React from 'react'; // import ButtonWithDefaultProps from './test/Button'; import Computed from './test/Computed'; import Link from 'umi/link'; +import router from 'umi/router'; import Button from '@material-ui/core/Button'; export default function() { + // 留作权限验证判断跳转 + router.push('/coderiver'); return (
@@ -13,11 +23,12 @@ export default function() { To get started, edit src/pages/index.js and save to reload.
  • - +
  • - go to display
  • diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx new file mode 100644 index 0000000..a586031 --- /dev/null +++ b/src/pages/user/index.tsx @@ -0,0 +1,9 @@ +import React from 'react'; + +export default function LoginLayout(props) { + return ( +
    +

    Login page

    +
    + ); +} diff --git a/src/type/displayType.d.ts b/src/type/common.d.ts similarity index 100% rename from src/type/displayType.d.ts rename to src/type/common.d.ts diff --git a/src/typing.d.ts b/src/type/model.d.ts similarity index 99% rename from src/typing.d.ts rename to src/type/model.d.ts index a1838ef..523351a 100644 --- a/src/typing.d.ts +++ b/src/type/model.d.ts @@ -1,7 +1,6 @@ import { AnyAction, Dispatch, Reducer } from 'redux'; import { History } from 'history'; - export interface ReducersMapObject { [key: string]: (api: ReducerPayload) => T; } diff --git a/tsconfig.json b/tsconfig.json index 5a24d20..dc3d026 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,13 +16,13 @@ "strictNullChecks": false, "baseUrl": "./", "paths": { - "src/*": ["src/*"] + "src/*": ["src/*"], + "component/*": ["component/*"], + "assets/*": ["assets/*"] }, "experimentalDecorators": true, "noImplicitAny": false }, "include": ["src"], - "exclude": [ - "node_modules" - ] + "exclude": ["node_modules"] }