fix example

This commit is contained in:
cookfront 2017-03-24 17:32:31 +08:00
parent 7b729f3d15
commit f089a405a3
3 changed files with 6 additions and 1 deletions

View File

@ -81,6 +81,7 @@ for (var item in Components) {
var exampleVueName = `${docsDir}/examples-dist/${item}.vue`;
// 新建一个文件
if (!fs.existsSync(exampleVueName)) {
fs.closeSync(fs.openSync(exampleVueName, 'w'));
}

View File

@ -2,6 +2,10 @@ const registerRoute = (navConfig, isExample) => {
let route = [];
let navs = navConfig['zh-CN'];
navs.forEach(nav => {
if (isExample && !nav.showInMobile) {
return;
}
if (nav.groups) {
nav.groups.forEach(group => {
group.list.forEach(nav => {

View File

@ -22,7 +22,7 @@
"deploy:docs": "rimraf docs/dist && npm run build:example && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js",
"dist": "npm run clean && npm run build:file && npm run lint && npm run build:zanui && npm run build:components && npm run build:utils && npm run build:zanui-css",
"clean": "rimraf lib && rimraf packages/*/lib",
"lint": "eslint src/**/*.js packages/**/*.{js,vue} --quiet",
"lint": "eslint src/**/*.js packages/**/*.{js,vue} build/**/*.js --quiet",
"test": "karma start test/unit/karma.conf.js --single-run; npm run coverage",
"test:watch": "karma start test/unit/karma.conf.js",
"coverage": "find test/unit/coverage/lcov-report -name 'index.html' | sed -n 1,1p | xargs -I {} open {} ",