From f0adb4dc5f656fc8af82e94c69fa221693d542c6 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Thu, 26 Jan 2017 19:51:06 +1100 Subject: [PATCH] site: run ant-design on windows #4725 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 5hours's work * 过年好!! * lint issue --- package.json | 11 +++++------ site/theme/index.js | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index a07a5a61f1..ac1ac3c26e 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "bisheng-plugin-react": "^0.4.0", "bisheng-plugin-toc": "^0.4.0", "coveralls": "^2.11.15", + "cross-env": "^3.1.4", "dekko": "^0.2.0", "dora-plugin-upload": "^0.3.1", "enquire.js": "^2.1.1", @@ -128,6 +129,7 @@ "react-stateless-wrapper": "^1.0.2", "react-sublime-video": "^0.2.0", "reqwest": "^2.0.5", + "rimraf": "^2.5.4", "typescript-babel-jest": "^0.1.5", "values.js": "^1.0.3", "xhr2": "^0.1.3" @@ -136,22 +138,19 @@ "test": "jest", "test-all": "./scripts/test-all.sh", "lint": "npm run tslint && npm run eslint && npm run demolint && npm run lesshint", - "tslint": "antd-tools run ts-lint && npm run compile && rm -rf lib", + "tslint": "antd-tools run ts-lint && npm run compile && rimraf lib", "eslint": "eslint tests site scripts components ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx'", - "demolint": "RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'", + "demolint": "cross-env RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'", "lesshint": "lesshint components -r scripts/lesshint-report.js", "eslint-fix": "eslint --fix tests site scripts components ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md", - "clean": "antd-tools run clean", "dist": "antd-tools run dist", "compile": "antd-tools run compile", - "start": "bisheng start -c ./site/bisheng.config.js --no-livereload", "babel-site": "babel ./site/theme/template --out-dir ./site/theme/template", - "clean-site": "rm site/theme/template/**/*.js site/theme/template/*.js", + "clean-site": "rimraf site/theme/template/**/*.js site/theme/template/*.js", "site": "npm run babel-site && bisheng build --ssr -c ./site/bisheng.config.js && npm run clean-site", "deploy": "npm run clean && npm run site && bisheng gh-pages --push-only", - "pub": "antd-tools run pub", "prepublish": "antd-tools run guard", "pre-publish": "npm run test-all && node ./scripts/prepub", diff --git a/site/theme/index.js b/site/theme/index.js index 31d58e1ea5..deeb8cd8f4 100644 --- a/site/theme/index.js +++ b/site/theme/index.js @@ -27,7 +27,7 @@ module.exports = { components(markdownData) { const filename = markdownData.meta.filename; if (!/^components/.test(filename) || - /\/demo$/.test(path.dirname(filename))) return; + /[/\\]demo$/.test(path.dirname(filename))) return; return { meta: markdownData.meta,