提交 abfe5df8 编写于 作者: Y yiminghe

add lib

上级 8e14ea69
......@@ -27,3 +27,4 @@ config/base.yaml
_site
npm-debug.log
dist
lib
......@@ -5,3 +5,5 @@ theme
static
_site
site
components
dist
\ No newline at end of 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
```
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册