Browse Source

add lib

pull/29/head
yiminghe 10 years ago
parent
commit
abfe5df83f
  1. 1
      .gitignore
  2. 2
      .npmignore
  3. 23
      README.md
  4. 6
      index.js
  5. 3
      package.json

1
.gitignore

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

2
.npmignore

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

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

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

3
package.json

@ -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…
Cancel
Save