瀏覽代碼

replace abandoned findit by findit2

Herbert Vojčík 9 年之前
父節點
當前提交
76f5d85111
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      lib/config-builder.js
  2. 1 1
      package.json

+ 2 - 1
lib/config-builder.js

@@ -1,7 +1,7 @@
 var path = require('path'),
     url = require('url'),
     _ = require('lodash'),
-    findit = require('findit'),
+    findit = require('findit2'),
     fs = require('fs');
 
 function eachConfigFile(root, callback) {
@@ -47,6 +47,7 @@ function transformPaths(json, root, file, dirs) {
             switch (typeof pathValue) {
                 case "string":
                     array[key] = url.resolve(dir, pathValue) || ".";
+                    if (array[key].slice(-1) === "/") array[key] = array[key].slice(0, -1);
                     break;
                 case "object":
                     Array.isArray(pathValue) && transformPathArray(pathValue);

+ 1 - 1
package.json

@@ -24,7 +24,7 @@
     "node": ">=0.10.0"
   },
   "dependencies": {
-    "findit": "^2.0.0",
+    "findit2": "^2.2.3",
     "lodash": "^2.4.1"
   }
 }