Escape leading periods on packageignore list (#373)

Otherwise, the `.` is interpreted as a period in a regular expression,
  which matches every literal character, causing some packages deep in
  the `node_modules/` hierarchy to be ignored for no reason.

For example, if we ignore `.git`, then a package like `foo-git` will be
excluded from the final package.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
Juan Cruz Viotti 2016-04-27 14:24:55 -04:00
parent 1de3d7b26c
commit f8b66b317a

View File

@ -25,8 +25,10 @@ console.log(_.flatten([
}),
// Top level hidden files
_.filter(topLevelFiles, function(file) {
_.map(_.filter(topLevelFiles, function(file) {
return _.startsWith(file, '.');
}), function(file) {
return '\\' + file;
}),
// Top level markdown files