Skip to content

Commit

Permalink
Ignore unnecessary files in dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Mar 18, 2017
1 parent 9355ae1 commit 788d954
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ function isNotUnimportant(dest) {
/^phpunit/,
/^l?gpl\.txt$/,
/^composer\.(json|lock)$/,
/^Makefile$/,
/^build\.xml$/,
/^phpcs-ruleset\.xml$/,
/^phpmd\.xml$/
].some(function(expr) { expr.test(filename) });
].some(function(expr) { return expr.test(filename); });

const destDisallowed = [
/^vendor\/htmlawed\/htmlawed\/htmLawed(Test\.php|(.*\.(htm|txt)))$/,
/^vendor\/smottt\/wideimage\/demo/,
/^vendor\/simplepie\/simplepie\/(db\.sql|autoload\.php)$/,
/^vendor\/composer\/installed\.json$/,
/^vendor\/[^/]+\/[^/]+\/(test|doc)s?/
].some(function(expr) { expr.test(dest) });
/^vendor\/[^/]+\/[^/]+\/(test|doc)s?/i,
/^vendor\/wallabag/,
/^vendor\/smalot\/pdfparser\/samples/,
/^vendor\/smalot\/pdfparser\/src\/Smalot\/PdfParser\/Tests/,
].some(function(expr) { return expr.test(dest); });

const allowed = !(filenameDisallowed || destDisallowed);

Expand Down

0 comments on commit 788d954

Please sign in to comment.