From cb0ef6c505e0c6adfc3ecee37d07a2045eaeebc2 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 23 Jul 2016 20:19:42 +0800 Subject: [PATCH] Merge ignoreFiles patterns Summary: Reduce (files * ignore patterns) times of matching filename, which cause the build tool scan files very slow. --- tools/isobuild/bundler.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index cd82a9bd26..0e84614ab4 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -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) {