ソースを参照

bug:骨架屏

lilinsen 6 年 前
コミット
4bda415d4b
1 ファイル変更27 行追加13 行削除
  1. 27 13
      scripts/mdToVue.js

+ 27 - 13
scripts/mdToVue.js

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