mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
refactor: remove some hard code
This commit is contained in:
parent
fb6c6abbc7
commit
f723d6ca51
@ -10,6 +10,7 @@
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb, Icon } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
const SubMenu = Menu.SubMenu;
|
||||
|
||||
ReactDOM.render(
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
|
||||
ReactDOM.render(
|
||||
<BrowserDemo>
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb, Icon } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
const SubMenu = Menu.SubMenu;
|
||||
|
||||
ReactDOM.render(
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
|
||||
ReactDOM.render(
|
||||
<BrowserDemo>
|
||||
|
@ -71,7 +71,7 @@
|
||||
"warning": "~2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"antd-md-loader": "0.1.0-beta.12",
|
||||
"antd-md-loader": "0.1.0-beta.13",
|
||||
"atool-build": "^0.5.0",
|
||||
"autoprefixer": "^6.3.3",
|
||||
"babel-cli": "^6.2.0",
|
||||
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Link } from 'react-router';
|
||||
import hljs from 'highlight.js';
|
||||
import antd from '../../';
|
||||
|
||||
function isHeading(type) {
|
||||
return /h[1-6]/i.test(type);
|
||||
@ -22,7 +21,7 @@ export function objectToComponent(pathname, object, index) {
|
||||
}
|
||||
|
||||
if (typeof object === 'function') {
|
||||
return React.cloneElement(object(React, ReactDOM, antd, antd), { key: index });
|
||||
return React.cloneElement(object(React, ReactDOM), { key: index });
|
||||
}
|
||||
|
||||
if (typeof object === 'string') {
|
||||
|
@ -2,5 +2,11 @@ module.exports = function(webpackConfig) {
|
||||
webpackConfig.entry = {
|
||||
index: './site/entry/index.jsx',
|
||||
};
|
||||
webpackConfig.resolve.root = process.cwd();
|
||||
webpackConfig.resolve.alias = {
|
||||
antd: 'index',
|
||||
BrowserDemo: 'site/component/BrowserDemo',
|
||||
};
|
||||
|
||||
return webpackConfig;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user