Skip to content

Commit

Permalink
optimize site
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Apr 21, 2016
1 parent f87ec52 commit ace39a4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/spec/layout/demo/aside.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/layout/demo/ceiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: 吊顶规范

````jsx
import { Menu, Breadcrumb } from 'antd';
import BrowserDemo from 'BrowserDemo';
import BrowserDemo from 'site/component/BrowserDemo';

ReactDOM.render(
<BrowserDemo>
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/layout/demo/top-aside.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/layout/demo/top.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: 顶部导航
````jsx
import { Menu, Breadcrumb } from 'antd';
import BrowserDemo from 'BrowserDemo';
import BrowserDemo from 'site/component/BrowserDemo';

ReactDOM.render(
<BrowserDemo>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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')();
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ace39a4

Please sign in to comment.