get rid of sourcedir in path for ignore filter matching

This commit is contained in:
C.T. Lin 2015-06-02 00:08:52 +08:00
parent ac8aea014e
commit f8c64fe755
3 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,8 @@ module.exports = {
}
function userFilter (file) {
file = file.split(path.resolve(opts.dir))[1]
var ignore = opts.ignore || []
if (!Array.isArray(ignore)) ignore = [ignore]
ignore = ignore.concat([finalDir])

2
mac.js
View File

@ -69,6 +69,8 @@ function buildMacApp (opts, cb, newApp) {
fs.writeFileSync(paths.info2, plist.build(pl2))
function filter (file) {
file = file.split(path.resolve(opts.dir))[1]
var ignore = opts.ignore || []
if (!Array.isArray(ignore)) ignore = [ignore]
for (var i = 0; i < ignore.length; i++) {

View File

@ -51,6 +51,7 @@ function buildWinApp (opts, cb, newApp) {
}
function filter (file) {
file = file.split(path.resolve(opts.dir))[1]
// convert slashes so unix-format ignores work
file = file.replace(/\\/g, '/')