Skip to content

Commit

Permalink
修改编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
lilinsen committed Mar 18, 2019
1 parent d8b1bc8 commit 5a980cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"mocha": "5.2.0",
"mocha-webpack": "2.0.0-beta.0",
"moment": "2.22.2",
"node-filelist": "^1.0.0",
"node-notifier": "5.2.1",
"node-sass": "4.9.3",
"nyc": "10.0.0",
Expand Down
21 changes: 16 additions & 5 deletions scripts/mdToVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let marked = require('marked');
if (!marked) {
console.log('you need npm i marked -D!');
}
var nodeFilelist = require('node-filelist');
//文件监听
let Chokidar = require('chokidar');
// 基本配置文件信息
Expand Down Expand Up @@ -293,15 +294,25 @@ function fileDisplay(param) {
comparehash(param.entry,(hashMsgObj)=>{

// 获取目录下所有文件
readDirRecur(param.entry, function(filePath) {
//文件列表
fileList.map(item=>{
// readDirRecur(param.entry, function(filePath) {
// //文件列表
// fileList.map(item=>{
// ismd(item,hashMsgObj,res=>{
// //res md文件处理结果
// createdFile(param.output + res.mdName + '.vue', res.html, param)
// })
// })
// });
nodeFilelist.read([param.entry],{"ext":"md"},res=>{
let reslength = res.length;
let routers = [];
res.map((item,index)=>{ //数组化文件
ismd(item,hashMsgObj,res=>{
//res md文件处理结果
createdFile(param.output + res.mdName + '.vue', res.html, param)
})
})
});
})
})
});


Expand Down

0 comments on commit 5a980cb

Please sign in to comment.