diff options
author | isaacs <i@izs.me> | 2012-03-19 20:27:11 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-03-19 20:27:18 +0400 |
commit | 41de32a034f9848312aed94b449ad591331ae2f4 (patch) | |
tree | e5d4c5991015a998f89b2fcc3ad36f89b318e95b | |
parent | 29f345639db4aa83a237e7054666e871723d57cc (diff) |
Exclude/include dot files as if they were normal files
Fix #2144
Related to #2188
-rw-r--r-- | lib/utils/excludes.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/utils/excludes.js b/lib/utils/excludes.js index 75fe41c05..83935ee35 100644 --- a/lib/utils/excludes.js +++ b/lib/utils/excludes.js @@ -92,6 +92,7 @@ function test (file, excludeList) { // log.warn(excludeList, "test list") var incRe = /^\!(\!\!)*/ , excluded = false + , mmconf = { matchBase: true, dot: true } for (var i = 0, l = excludeList.length; i < l; i ++) { var excludes = excludeList[i] , dir = excludes.dir @@ -121,12 +122,12 @@ function test (file, excludeList) { if (inc && !excluded) continue // if it matches the pattern, then it should be excluded. - excluded = !!minimatch(rf, ex, { matchBase: true }) + excluded = !!minimatch(rf, ex, mmconf) // log.error([rf, ex, excluded], "rf, ex, excluded") // if you include foo, then it also includes foo/bar.js if (inc && excluded && ex.slice(-3) !== "/**") { - excluded = minimatch(rf, ex + "/**", { matchBase: true }) + excluded = minimatch(rf, ex + "/**", mmconf) // log.warn([rf, ex + "/**", inc, excluded], "dir without /") } @@ -141,6 +142,7 @@ function test (file, excludeList) { ll ++ } } + // log.warn([rf, excluded, excludes], "rf, excluded, excludes") } // true if it *should* be included |