整体配置
首先是项目大致结构:
/*这里只展示大概目录结构, 具体目录请参考 ant-pro ( jsx版本 )*/
│ README.md
│
├─config
│ config.js
│ defaultSettings.js
│ plugin.config.js
│ router.config.js /*这里将 route 提取出来了*/
│
├─mock
│ user.js
│
├─public
│ └─icons
└─src
│ global.jsx
│ global.less
│ manifest.json
│ service-worker.js
│
├─assets
│ logo.svg
│
├─components
│ └─PageLoading
│ index.jsx
│
├─layouts
│ BasicLayout.jsx
│
├─locales
│ en-US.js
│ zh-CN.js
│ zh-TW.js
│
├─models
│ global.js
│
├─pages
│ 404.jsx
│ Authorized.jsx
│ document.ejs
│ Welcome.jsx
│
├─services
│ login.js
│
└─utils
utils.js
其次是项目的相关依赖(即截止到
2019-10-30
号最新的ant-pro
版本)
"dependencies": {
"@ant-design/pro-layout": "^4.5.16",
"@antv/data-set": "^0.10.2",
"@types/lodash.isequal": "^4.5.5",
"antd": "^3.23.6",
"axios": "^0.19.0",
"blueimp-md5": "^2.12.0",
"classnames": "^2.2.6",
"dva": "^2.4.1",
"js-base64": "^2.5.1",
"js-cookie": "^2.2.1",
"lodash": "^4.17.11",
"lodash.isequal": "^4.5.0",
"moment": "^2.24.0",
"numeral": "^2.0.6",
"nzh": "^1.0.4",
"omit.js": "^1.0.2",
"path-to-regexp": "^3.1.0",
"qs": "^6.9.0",
"react": "^16.8.6",
"react-copy-to-clipboard": "^5.0.1",
"react-document-title": "^2.0.3",
"react-dom": "^16.8.6",
"react-router": "^4.3.1",
"redux": "^4.0.1",
"umi": "^2.9.6",
"umi-plugin-pro-block": "^1.3.4",
"umi-plugin-react": "^1.10.1",
"umi-request": "^1.2.7"
},
"devDependencies": {
"@ant-design/colors": "^3.1.0",
"@ant-design/pro-cli": "^1.0.13",
"@types/classnames": "^2.2.7",
"@types/express": "^4.17.0",
"@types/history": "^4.7.2",
"@types/jest": "^24.0.13",
"@types/lodash": "^4.14.144",
"@types/qs": "^6.5.3",
"@types/react": "^16.8.19",
"@types/react-document-title": "^2.0.3",
"@types/react-dom": "^16.8.4",
"@umijs/fabric": "^1.1.0",
"chalk": "^2.4.2",
"check-prettier": "^1.0.3",
"cross-env": "^6.0.0",
"cross-port-killer": "^1.1.1",
"enzyme": "^3.9.0",
"eslint": "5.16.0",
"express": "^4.17.1",
"gh-pages": "^2.0.1",
"husky": "^3.0.0",
"import-sort-cli": "^6.0.0",
"import-sort-parser-babylon": "^6.0.0",
"import-sort-parser-typescript": "^6.0.0",
"import-sort-style-module": "^6.0.0",
"jest-puppeteer": "^4.2.0",
"lint-staged": "^9.0.0",
"mockjs": "^1.0.1-beta3",
"node-fetch": "^2.6.0",
"prettier": "^1.17.1",
"pro-download": "1.0.1",
"slash2": "^2.0.0",
"stylelint": "^10.1.0",
"umi-plugin-ga": "^1.1.3",
"umi-plugin-pro": "^1.0.2",
"umi-types": "^0.5.0",
"webpack-theme-color-replacer": "^1.2.15"
},
网友评论