mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
add lib
This commit is contained in:
parent
8e14ea69da
commit
abfe5df83f
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,3 +27,4 @@ config/base.yaml
|
||||
_site
|
||||
npm-debug.log
|
||||
dist
|
||||
lib
|
||||
|
@ -5,3 +5,5 @@ theme
|
||||
static
|
||||
_site
|
||||
site
|
||||
components
|
||||
dist
|
23
README.md
23
README.md
@ -6,6 +6,21 @@
|
||||
|
||||
![](https://t.alipayobjects.com/images/rmsweb/T11aVgXc4eXXXXXXXX.svg)
|
||||
|
||||
## 使用
|
||||
|
||||
### 静态使用
|
||||
|
||||
script 直接引用 `dist/antd.js` `dist/antd.css` 后,通过全局变量 antd 使用
|
||||
|
||||
### npm
|
||||
|
||||
`npm install antd` 后,使用示例
|
||||
|
||||
```js
|
||||
require('antd/style/index.less');
|
||||
require('antd/lib/datepicker');
|
||||
```
|
||||
|
||||
## 特性
|
||||
|
||||
- 丰富实用的 UI 组件。
|
||||
@ -47,5 +62,11 @@ $ npm run deploy
|
||||
#### 构建
|
||||
|
||||
```bash
|
||||
$ webpack
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
#### 发布到 npm
|
||||
|
||||
```bash
|
||||
$ npm run pub
|
||||
```
|
||||
|
6
index.js
6
index.js
@ -17,4 +17,8 @@ var antd = {
|
||||
cssAnimation: require('css-animation')
|
||||
};
|
||||
|
||||
module.exports = window.antd = antd;
|
||||
module.exports = antd;
|
||||
|
||||
if (typeof window !== undefined) {
|
||||
window.antd = antd;
|
||||
}
|
||||
|
@ -27,6 +27,7 @@
|
||||
"rc-tooltip": "~2.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel": "~5.6.14",
|
||||
"babel-core": "~5.4.7",
|
||||
"babel-loader": "~5.1.3",
|
||||
"buildbranch": "0.0.3",
|
||||
@ -47,7 +48,9 @@
|
||||
"webpack-dev-middleware": "~1.0.11"
|
||||
},
|
||||
"scripts": {
|
||||
"babel": "babel components --out-dir lib",
|
||||
"build": "npm run clean && webpack && nico build",
|
||||
"pub": "npm run babel && npm publish && tnpm sync antd",
|
||||
"start": "npm run clean && nico server --watch",
|
||||
"clean": "rm -rf _site",
|
||||
"deploy": "npm run build && node deploy.js",
|
||||
|
Loading…
Reference in New Issue
Block a user