Ant Design Pro 是基于 Ant Design 和 umi 的封装的一整套企业级中后台前端/设计解决方案,致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。
Ant Design 是一套企业级 UI 设计语言和 React 组件库。作为西湖区最好的组件库,它极大的提升了中后台开发的效率,广受国内外开发者的喜爱。
Webpack 可以帮助我们完成一些任务。比如 js 压缩、css 压缩、编译模板文件等等,从而减少前端的工作量。当然,Webpack 功能很强大,能帮我们完成的工作远远不止这些。
umi 是一个 Webpack 之上的整合工具。 umi 相比于 Webpack 增加了运行时的能力,同时帮助我们配置了很多 Webpack 的预设。也减少了 Webpack 升级导致的问题。
Ant Design Pro: https://pro.ant.design/
Ant Design: https://ant.design/
Webpack: https://webpack.js.org/
umi:https://github.com/umijs/umi
1. 系统环境
操作系统:CentOS 7.9 (x64)
NodeJS: 16.20.0
NPM: 8.19.4
NVM: 0.39.2
Ant Design Pro: 5.0.0
2. 创建 Ant Design Pro 项目
安装 @ant-design/pro-cli 脚手架,命令如下:
# 使用 -g 参数,表示该命令只需在本机上运行一次
$ npm i @ant-design/pro-cli -g
npm WARN deprecated [email protected]: This functionality has been moved to @npmcli/fs npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs npm WARN deprecated [email protected]: 0.x is no longer supported. Please upgrade to 4.x or higher. npm WARN deprecated @stylelint/[email protected]: Use the original unforked package instead: postcss-markdown npm WARN deprecated @stylelint/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: 0.x is no longer supported. Please upgrade to 3.x or higher. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: 1.x is no longer supported. Please upgrade to 6.x or higher. npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. added 1166 packages in 29s
使用 pro 命令创建 Ant Design Pro 项目,命令如下:
$ pro create myapp
? 标签:npm,NodeJS,deprecated,Pro,js,Ant,Webpack,组件,路由 From: https://www.cnblogs.com/tkuang/p/17600095.html