mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix example
This commit is contained in:
parent
7b729f3d15
commit
f089a405a3
@ -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'));
|
||||
}
|
||||
|
@ -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 => {
|
||||
|
@ -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 {} ",
|
||||
|
Loading…
x
Reference in New Issue
Block a user