2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2025-01-24 07:38:36 +00:00

Merge pull request #45 from zaggino/zaggino/fix

fix defaultIgnores to be proper reg-exps
This commit is contained in:
=^._.^= 2015-05-21 21:05:48 -07:00
commit 9b6237afca

View File

@ -32,7 +32,7 @@ module.exports = function packager (opts, cb) {
} }
// Ignore this and related modules by default // Ignore this and related modules by default
var defaultIgnores = ['node_modules/electron-prebuilt', 'node_modules/electron-packager', '.git'] var defaultIgnores = ['/node_modules/electron-prebuilt($|/)', '/node_modules/electron-packager($|/)', '/\.git($|/)']
if (opts.ignore && !Array.isArray(opts.ignore)) opts.ignore = [opts.ignore] if (opts.ignore && !Array.isArray(opts.ignore)) opts.ignore = [opts.ignore]
opts.ignore = (opts.ignore) ? opts.ignore.concat(defaultIgnores) : defaultIgnores opts.ignore = (opts.ignore) ? opts.ignore.concat(defaultIgnores) : defaultIgnores