Merge ignoreFiles patterns

Summary:

Reduce (files * ignore patterns) times of matching filename, which
cause the build tool scan files very slow.
This commit is contained in:
c9s
2016-07-23 20:19:42 +08:00
committed by seke
parent 465a7f724c
commit cb0ef6c505

View File

@@ -173,11 +173,13 @@ import { CORDOVA_PLATFORM_VERSIONS } from '../cordova';
// files to ignore when bundling. node has no globs, so use regexps
exports.ignoreFiles = [
/~$/, /^\.#/, /^#.*#$/, // emacs swap files
/^\..*\.sw.$/, // vim swap files
/^\.DS_Store\/?$/, /^ehthumbs\.db$/, /^Icon.$/, /^Thumbs\.db$/,
/^\.meteor\/$/, /* avoids scanning N^2 files when bundling all packages */
/^\.git\/$/ /* often has too many files to watch */
/~$/, /^\.#/,
/^(\.meteor\/|\.git\/|Thumbs\.db|\.DS_Store\/?|Icon.|ehthumbs\.db|\..*\.sw.|#.*#)$/,
/* .meteor => avoids scanning N^2 files when bundling all packages
.git => often has too many files to watch
....sw(.) => vim swap files
#.*# => emacs swap files
*/
];
function rejectBadPath(p) {