This commit is contained in:
yiminghe 2015-07-02 12:12:13 +08:00
parent 8e14ea69da
commit abfe5df83f
5 changed files with 33 additions and 2 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ config/base.yaml
_site
npm-debug.log
dist
lib

View File

@ -5,3 +5,5 @@ theme
static
_site
site
components
dist

View File

@ -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
```

View File

@ -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;
}

View File

@ -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",