You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.1 KiB
66 lines
2.1 KiB
9 years ago
|
---
|
||
|
order: 2
|
||
9 years ago
|
title: 安装
|
||
9 years ago
|
---
|
||
10 years ago
|
|
||
9 years ago
|
## 使用 npm 安装
|
||
10 years ago
|
|
||
9 years ago
|
**我们推荐使用 npm 的方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
|
||
10 years ago
|
|
||
9 years ago
|
可以通过 npm 直接安装到项目中,使用 `import` 或 `require` 进行引用。
|
||
10 years ago
|
|
||
9 years ago
|
稳定版:
|
||
9 years ago
|
|
||
9 years ago
|
[![npm package](http://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
|
||
9 years ago
|
|
||
10 years ago
|
```bash
|
||
|
$ npm install antd --save
|
||
|
```
|
||
10 years ago
|
|
||
9 years ago
|
开发版本:
|
||
9 years ago
|
|
||
9 years ago
|
[![](https://cnpmjs.org/badge/v/antd.svg?&tag=beta&subject=npm)](https://www.npmjs.org/package/antd)
|
||
|
|
||
9 years ago
|
```bash
|
||
|
$ npm install antd@beta --save
|
||
|
```
|
||
|
|
||
9 years ago
|
> **历史版本**:https://github.com/ant-design/ant-design/releases
|
||
|
|
||
|
|
||
9 years ago
|
## 浏览器引入
|
||
|
|
||
9 years ago
|
我们在 npm 发布包内的 `antd/dist` 目录下提供了 `antd.js` `antd.css` 以及 `antd.min.js` `antd.min.css` 用于一次性引入所有的 antd 组件,也可以通过 [npmcdn](https://npmcdn.com/) 进行下载。
|
||
|
|
||
9 years ago
|
> 不推荐使用构建文件,因为难以获得底层依赖模块的 bug 快速修复支持。
|
||
|
|
||
9 years ago
|
#### stable
|
||
|
|
||
|
- https://npmcdn.com/antd/dist/antd.js
|
||
|
- https://npmcdn.com/antd/dist/antd.css
|
||
|
- https://npmcdn.com/antd/dist/antd.min.js
|
||
|
- https://npmcdn.com/antd/dist/antd.min.css
|
||
|
|
||
|
#### beta
|
||
|
|
||
|
- https://npmcdn.com/antd@beta/dist/antd.js
|
||
|
- https://npmcdn.com/antd@beta/dist/antd.css
|
||
|
- https://npmcdn.com/antd@beta/dist/antd.min.js
|
||
|
- https://npmcdn.com/antd@beta/dist/antd.min.css
|
||
9 years ago
|
|
||
9 years ago
|
> 对于 1.0 之前的版本,这里有一个 [自行构建的例子](https://github.com/ant-design/antd-init/tree/master/examples/build-antd-standalone) 以供参考。
|
||
9 years ago
|
|
||
9 years ago
|
## 开发工具
|
||
10 years ago
|
|
||
9 years ago
|
我们提供了 React 前端应用开发的 [脚手架工具](https://github.com/ant-design/antd-init),可以安装到全局直接使用。
|
||
10 years ago
|
|
||
|
```bash
|
||
9 years ago
|
$ npm install antd-init -g
|
||
10 years ago
|
```
|
||
|
|
||
9 years ago
|
在空目录运行 `antd-init` 可以初始化一个 antd 的前端应用。
|
||
10 years ago
|
|
||
9 years ago
|
最新的脚手架结构可以到这里 [查看](https://github.com/ant-design/antd-init/tree/master/boilerplate),建议持续关注更新以便获得最新的开发工程特性。
|
||
|
|
||
9 years ago
|
> 更多开发工具 [使用方式](http://ant-tool.github.io/)。
|