mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs build
This commit is contained in:
parent
ea467a7f24
commit
fb4bd2eaea
@ -15,17 +15,17 @@ var renderVueTemplate = function (html, componentName) {
|
||||
decodeEntities: false,
|
||||
lowerCaseAttributeNames: false,
|
||||
lowerCaseTags: false
|
||||
})
|
||||
});
|
||||
|
||||
var output = {
|
||||
style: $.html('style'),
|
||||
script: $.html('script'),
|
||||
'example-block': $.html('example-block')
|
||||
}
|
||||
var result
|
||||
};
|
||||
var result;
|
||||
|
||||
$('style').remove()
|
||||
$('script').remove()
|
||||
$('style').remove();
|
||||
$('script').remove();
|
||||
|
||||
var script = '';
|
||||
if (output.script) {
|
||||
@ -38,7 +38,7 @@ var renderVueTemplate = function (html, componentName) {
|
||||
output.style + '\n' +
|
||||
script;
|
||||
|
||||
return result
|
||||
return result;
|
||||
}
|
||||
|
||||
function convert(str) {
|
||||
@ -79,7 +79,7 @@ for (var item in Components) {
|
||||
var content = parser.render(itemMd);
|
||||
var result = renderVueTemplate(content, item);
|
||||
|
||||
var exampleVueName = `${docsDir}/examples/${item}.vue`;
|
||||
var exampleVueName = `${docsDir}/examples-dist/${item}.vue`;
|
||||
|
||||
if (!fs.existsSync(exampleVueName)) {
|
||||
fs.closeSync(fs.openSync(exampleVueName, 'w'));
|
||||
|
@ -21,7 +21,7 @@ const registerRoute = (navConfig, isExample) => {
|
||||
route.push({
|
||||
path: '/component' + page.path,
|
||||
component: function(resolve) {
|
||||
require([isExample ? `./examples${page.path}.vue` : `./examples-docs${page.path}.md`], resolve);
|
||||
require([isExample ? `./examples-dist${page.path}.vue` : `./examples-docs${page.path}.md`], resolve);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user