mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
optimize site
This commit is contained in:
parent
f87ec5248e
commit
ace39a464e
@ -9,7 +9,7 @@ title: 侧边导航
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb, Icon } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
import BrowserDemo from 'site/component/BrowserDemo';
|
||||
const SubMenu = Menu.SubMenu;
|
||||
|
||||
ReactDOM.render(
|
||||
|
@ -9,7 +9,7 @@ title: 吊顶规范
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
import BrowserDemo from 'site/component/BrowserDemo';
|
||||
|
||||
ReactDOM.render(
|
||||
<BrowserDemo>
|
||||
|
@ -7,7 +7,7 @@ title: 顶部导航 + 侧边栏
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb, Icon } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
import BrowserDemo from 'site/component/BrowserDemo';
|
||||
const SubMenu = Menu.SubMenu;
|
||||
|
||||
ReactDOM.render(
|
||||
|
@ -11,7 +11,7 @@ title: 顶部导航
|
||||
|
||||
````jsx
|
||||
import { Menu, Breadcrumb } from 'antd';
|
||||
import BrowserDemo from 'BrowserDemo';
|
||||
import BrowserDemo from 'site/component/BrowserDemo';
|
||||
|
||||
ReactDOM.render(
|
||||
<BrowserDemo>
|
||||
|
@ -127,10 +127,10 @@
|
||||
"scripts": {
|
||||
"babel": "babel components index.js --out-dir lib",
|
||||
"clean-build": "rm -rf _site _data && ./scripts/build-website.js",
|
||||
"dora": "ANTD=WEBSITE dora -p 8001 --plugins webpack?disableNpmInstall,hmr",
|
||||
"dora": "RUN_ENV=WEBSITE dora -p 8001 --plugins webpack?disableNpmInstall,hmr",
|
||||
"start": "npm run clean-build && npm run dora",
|
||||
"copy-html": "cp ./index.html ./_site/index.html && mkdir ./_site/_site && mv ./_site/demo-* ./_site/_site",
|
||||
"site": "npm run clean-build && ANTD=WEBSITE atool-build -o ./_site && npm run copy-html",
|
||||
"site": "npm run clean-build && RUN_ENV=WEBSITE atool-build -o ./_site && npm run copy-html",
|
||||
"deploy": "rm -rf node_modules && node scripts/install.js && npm run just-deploy",
|
||||
"just-deploy": "npm run site && node scripts/deploy.js",
|
||||
"lint": "npm run srclint && npm run demolint && npm run lesshint",
|
||||
|
@ -6,7 +6,7 @@ module.exports = function (webpackConfig) {
|
||||
return !(plugin instanceof webpack.optimize.CommonsChunkPlugin);
|
||||
});
|
||||
|
||||
if (process.env.ANTD === 'WEBSITE') {
|
||||
if (process.env.RUN_ENV === 'WEBSITE') {
|
||||
const component = process.env.COMPONENT_STYLE;
|
||||
|
||||
webpackConfig.entry = {
|
||||
@ -15,7 +15,7 @@ module.exports = function (webpackConfig) {
|
||||
webpackConfig.resolve.root = process.cwd();
|
||||
webpackConfig.resolve.alias = {
|
||||
antd: process.cwd(),
|
||||
BrowserDemo: 'site/component/BrowserDemo',
|
||||
site: 'site',
|
||||
};
|
||||
|
||||
const babelConfig = require('atool-build/lib/getBabelCommonConfig')();
|
||||
@ -43,7 +43,7 @@ module.exports = function (webpackConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.ANTD === 'PRODUCTION') {
|
||||
if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
const entry = ['./style/index.less', './index.js'];
|
||||
webpackConfig.entry = {
|
||||
'antd.min': entry,
|
||||
|
Loading…
Reference in New Issue
Block a user