diff --git a/build/genExamples.js b/build/genExamples.js index 129dc1e0e..3152b4f4d 100644 --- a/build/genExamples.js +++ b/build/genExamples.js @@ -5,7 +5,7 @@ var path = require('path'); var cheerio = require('cheerio'); var chalk = require('chalk'); var striptags = require('./strip-tags'); -var navs = require('../docs/nav.config.json'); +var navs = require('../docs/src/nav.config.js'); navs = navs['zh-CN']; var parser = markdownIt('default', { @@ -31,9 +31,9 @@ var renderVueTemplate = function (html, componentName) { var script = ''; if (output.script) { - script = output.script.replace(''; + script = ''; } result = `\n' + diff --git a/build/webpack.config.js b/build/webpack.config.js index d10a4eada..044d6c04d 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -35,8 +35,8 @@ function wrap(render) { module.exports = { entry: { 'vendor': ['vue', 'vue-router'], - 'zan-docs': './docs/index.js', - 'zan-examples': './docs/examples.js' + 'zan-docs': './docs/src/index.js', + 'zan-examples': './docs/src/examples.js' }, output: { path: path.join(__dirname, '../docs/dist'), @@ -55,7 +55,7 @@ module.exports = { 'src': path.join(__dirname, '../src'), 'packages': path.join(__dirname, '../packages'), 'lib': path.join(__dirname, '../lib'), - 'components': path.join(__dirname, '../docs/components') + 'components': path.join(__dirname, '../docs/src/components') } }, module: { @@ -150,13 +150,13 @@ module.exports = { }), new HtmlWebpackPlugin({ chunks: ['vendor', 'zan-docs'], - template: 'docs/index.tpl', + template: 'docs/src/index.tpl', filename: 'index.html', inject: true }), new HtmlWebpackPlugin({ chunks: ['vendor', 'zan-examples'], - template: 'docs/index.tpl', + template: 'docs/src/index.tpl', filename: 'examples.html', inject: true }), diff --git a/docs/examples-dist/actionsheet.vue b/docs/examples-dist/actionsheet.vue index 80300646d..8fe60d92a 100644 --- a/docs/examples-dist/actionsheet.vue +++ b/docs/examples-dist/actionsheet.vue @@ -43,7 +43,7 @@ } \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/card.vue b/docs/examples-dist/card.vue index 7545736c2..df1e123ae 100644 --- a/docs/examples-dist/card.vue +++ b/docs/examples-dist/card.vue @@ -20,4 +20,4 @@ \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/cell.vue b/docs/examples-dist/cell.vue index 21497667a..7e3a8026b 100644 --- a/docs/examples-dist/cell.vue +++ b/docs/examples-dist/cell.vue @@ -36,7 +36,7 @@ \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/image-preview.vue b/docs/examples-dist/image-preview.vue index 54daf52b4..37d71469b 100644 --- a/docs/examples-dist/image-preview.vue +++ b/docs/examples-dist/image-preview.vue @@ -14,7 +14,7 @@ } \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/lazyload.vue b/docs/examples-dist/lazyload.vue index f3bb7137d..637093324 100644 --- a/docs/examples-dist/lazyload.vue +++ b/docs/examples-dist/lazyload.vue @@ -46,7 +46,7 @@ } \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/panel.vue b/docs/examples-dist/panel.vue index bdce2d348..aaca6e5a5 100644 --- a/docs/examples-dist/panel.vue +++ b/docs/examples-dist/panel.vue @@ -62,4 +62,4 @@ } \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/picker.vue b/docs/examples-dist/picker.vue index a99eaa6d4..5e33b9d9f 100644 --- a/docs/examples-dist/picker.vue +++ b/docs/examples-dist/picker.vue @@ -11,7 +11,7 @@ \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/quantity.vue b/docs/examples-dist/quantity.vue index 6e9cd6075..939fa032b 100644 --- a/docs/examples-dist/quantity.vue +++ b/docs/examples-dist/quantity.vue @@ -24,7 +24,7 @@ } \ No newline at end of file +import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock); \ No newline at end of file diff --git a/docs/examples-dist/toast.vue b/docs/examples-dist/toast.vue index e158fb670..405b649bc 100644 --- a/docs/examples-dist/toast.vue +++ b/docs/examples-dist/toast.vue @@ -30,7 +30,7 @@ } diff --git a/docs/components/demo-block.vue b/docs/src/components/demo-block.vue similarity index 100% rename from docs/components/demo-block.vue rename to docs/src/components/demo-block.vue diff --git a/docs/components/demo-list.vue b/docs/src/components/demo-list.vue similarity index 96% rename from docs/components/demo-list.vue rename to docs/src/components/demo-list.vue index 46b148166..3369229e4 100644 --- a/docs/components/demo-list.vue +++ b/docs/src/components/demo-list.vue @@ -13,7 +13,7 @@ +