ソースを参照

修改缓存文件

lilinsen 7 年 前
コミット
e2a6e6087d
2 ファイル変更6 行追加1 行削除
  1. 2 0
      .gitignore
  2. 4 1
      scripts/mdToVue.js

+ 2 - 0
.gitignore

@@ -12,3 +12,5 @@ package-lock.json
 yarn.lock
 yarn.lock
 docshashCache.text
 docshashCache.text
 srchashCache.text
 srchashCache.text
+localsrc.cache
+localdocs.cache

+ 4 - 1
scripts/mdToVue.js

@@ -140,7 +140,10 @@ function fileReadStar(filedir,callback){
 }
 }
 /**
 /**
  * 判断是否位md文件 并进行操作
  * 判断是否位md文件 并进行操作
+ * 判断文件是否有改动
  * @src {string} 打开的文件目录
  * @src {string} 打开的文件目录
+ * @hasobj {obj} hash对象
+ * @callback {fn} 回调函数
  */
  */
 function ismd(src,hasobj,callback){
 function ismd(src,hasobj,callback){
     //判断文件类型是否是md文件    
     //判断文件类型是否是md文件    
@@ -180,7 +183,7 @@ function ismd(src,hasobj,callback){
  */
  */
 function checkIsexists (path,callback){  
 function checkIsexists (path,callback){  
     let pathFileName = path.replace(/[^a-zA-Z]/g,'');
     let pathFileName = path.replace(/[^a-zA-Z]/g,'');
-    let cacheName = './'+pathFileName+'hashCache.text';
+    let cacheName = './local'+pathFileName+'.cache';
     fs.exists(cacheName, res=>{
     fs.exists(cacheName, res=>{
         console.log(res)
         console.log(res)
         if(!res){
         if(!res){