Skip to content

Commit

Permalink
bug:骨架屏
Browse files Browse the repository at this point in the history
  • Loading branch information
lilinsen committed Jul 9, 2019
1 parent 220a28f commit 4bda415
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions scripts/mdToVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ class mdVue{
folders: { exclude: ['.*', 'node_modules', 'test_coverage'] },
files: { include: ['*.md']},
matchBasename: true
}).then(hash => {
}).then(hash => {

nodeFilelist.read([_that.options.entry],{"ext":'md'}, res => {
res.map(item =>{
res.map((item,index) =>{
if(index == 30){
debugger
}
let fileSplits = item.path.split(path.sep);
let fileName = fileSplits.pop();
if(_that.isDoc(fileName)){
Expand All @@ -76,17 +80,27 @@ class mdVue{
fileName = fileName.replace(/\.md/,'');
}
if(_that.needHandleFiles[fileName]){
_that.read(item.path).then(res=>{
_that.headHandle();
_that.markHandle();
let html = _that.marked(res);
_that.write({
outsrc:_that.options.output,
name:fileName + '.vue',
html:html
});
})
}
// _that.read(item.path).then(res=>{
// _that.headHandle();
// _that.markHandle();
// let html = _that.marked(res);
// _that.write({
// outsrc:_that.options.output,
// name:fileName + '.vue',
// html:html
// });
// })
}
_that.read(item.path).then(res=>{
_that.headHandle();
_that.markHandle();
let html = _that.marked(res);
_that.write({
outsrc:_that.options.output,
name:fileName + '.vue',
html:html
});
})
});
});
})
Expand Down

0 comments on commit 4bda415

Please sign in to comment.