mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
Merge branch 'master' of github.com:ant-design/ant-design
This commit is contained in:
commit
af6c0815e2
@ -7,6 +7,14 @@
|
||||
|
||||
Ant Design React 致力于提供给程序员**愉悦**的开发体验。
|
||||
|
||||
## JSFiddle
|
||||
|
||||
最简单尝试 antd 的方式是使用以下 JSFiddle 例子, 也推荐 fork 这个例子来进行 bug report, 注意不要在实际项目中使用
|
||||
|
||||
- [antd JSFiddle](http://jsfiddle.net/yiminghe/9zrstuto/1/)
|
||||
|
||||
## Using antd from npm
|
||||
|
||||
实际项目开发中,你会需要对 ES2015 和 JSX 代码的构建、调试、代理、打包部署等一系列工程化的需求。
|
||||
我们提供了一套 `npm` + `webpack` 的开发工具链来辅助开发,下面我们用一个简单的实例来说明。
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
||||
"start": "npm run clean && nico server --watch",
|
||||
"clean": "rm -rf _site dist",
|
||||
"deploy": "rm -rf node_modules && node scripts/install.js && npm run just-deploy",
|
||||
"just-deploy": "npm run clean && webpack --config webpack.deploy.config.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js",
|
||||
"just-deploy": "npm run clean && webpack --config webpack.deploy.config.js && webpack --config webpack.antd.config.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js",
|
||||
"lint": "eslint components test index.js --ext '.js,.jsx'",
|
||||
"test": "npm run lint && webpack && npm run jest",
|
||||
"jest": "jest",
|
||||
|
21
webpack.antd.config.js
Normal file
21
webpack.antd.config.js
Normal file
@ -0,0 +1,21 @@
|
||||
var config = require('./webpack.config');
|
||||
config.entry = {
|
||||
'antd': ['./index.js']
|
||||
};
|
||||
config.externals = {
|
||||
'react': {
|
||||
root: 'React',
|
||||
commonjs2: 'react',
|
||||
commonjs: 'react',
|
||||
amd: 'react'
|
||||
},
|
||||
'react-dom': {
|
||||
root: 'ReactDOM',
|
||||
commonjs2: 'react-dom',
|
||||
commonjs: 'react-dom',
|
||||
amd: 'react-dom'
|
||||
}
|
||||
};
|
||||
config.output.library = 'antd';
|
||||
config.output.libraryTarget = 'umd';
|
||||
module.exports = config;
|
Loading…
Reference in New Issue
Block a user