docs build

This commit is contained in:
cookfront 2017-03-06 19:29:18 +08:00
parent ea467a7f24
commit fb4bd2eaea
20 changed files with 8 additions and 8 deletions

View File

@ -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'));

View File

@ -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);
}
});
}