Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Reduce installer size by file types
Browse files Browse the repository at this point in the history
Auditors: @aekeus

Fix #7896

By ignoring by file type we can remove a lot of the redundant rules and catch things automatically as we add deps. I found this script on SO which lists all file types recursively

`find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u | gvim`
http://stackoverflow.com/a/1842270/3153

After getting that list I exluded the things I think we need, and then
bisected when there was a problem starting the browser.
  • Loading branch information
bbondy committed Mar 26, 2017
1 parent 577f9b6 commit ff34277
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions tools/lib/ignoredPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,23 @@ module.exports = [
'caniuse-db',
'cross-env',
'spectron',
'\\.(0|13ctype|APACHE2|BSD|DOCS|DS_Store|LESSER|Makefile|a|ac|aff|after|am|arcconfig|arclint|babelrc|bat|before|bnf|brave-gyp|c|cardinalrc|cc|cfg|closure-compiler|cmake|cmd|covignore|cpp|csv|cxx|d|def|deps|dic|dll|dntrc|dockerignore|dsp|editorconfig|editorconfig~|el|enc|entitlements|eot|esprima|flow|flowconfig|gitattributes|githug|gitignore|gitattributes|gitignore|gitkeep|gitmodules|gnu|gradle|gyp|gypi|gz|h|hbs|hxx|idl|iml|in|inc|include|info|jade|java|jsfmtrc|jshint|jshintignore|jshintrc|jslintrc|jst|js~|keep|lint|lintignore|lock|log|ls|m4|mailmap|map|markdown|md|mdown|md~|mem|min-wd|mk|mkd|mm|mustache|myspell|myspell|name|nsh|nsi|nsprc|nuspec|nvmrc|o|old|orig|otf|param|patch|pegjs|post|pre|pro|py|rej|s|sage|scss|settings|sh|skip|source-map|stamp|swo|tap|targ|template|tern-port|tern-project|testignore|tm_properties|tmp|tpl|ts|txt|un~|vscode|xcf|xml|yaml|yml)$',
'/deps/',
'Release/obj',
'obj.target',
'ad-block/(node_modules|test|perf|sample|scripts|test|vendor|ABPFilterParserData.dat)',
'ad-block/build/Release/(obj|obj.target|.deps|ad-block.pdb|ad-block.map)',
'leveldown/(node_modules|src|iojs)',
'tracking-protection/(node_modules|test|data|scripts|vendor)',
'tracking-protection/build/node_modules',
'tracking-protection/build/Release/(tp_node_addon.pdb|sample.pdb|test.pdb|tp_node_addon.map|sample.map|test.map|hashset-cpp.map|sample.exe|test.exe)',
'hashset-cpp/build/Release/(obj|hashset-cpp.pdb|hashset-cpp.map)',
'bloom-filter-cpp/build/Release/(obj|bloom-filter-cpp.map|bloom-filter-cpp.pdb)',
'keytar/build/Release/(obj|keytar.pdb|keytar.map)',
'spellchecker/build/Release/(obj|spellchecker.pdb|spellchecker.map)',
'sqlite3/(src|deps)',
'sqlite3/build/Release/(obj|obj.target|.deps)',
'tracking-protection/build/Release/(obj|obj.target|.deps|hashset-cpp.pdb)',
'tracking-protection/build/Release/(sample.exe|test.exe)',
'sqlite3/src',
'nsp/node_modules',
'electron-installer-squirrel-windows',
'electron-chromedriver',
'electron-installer-debian',
'node-notifier/vendor',
'node-gyp',
'npm',
'.brave-gyp',
'.vscode',
'.github',
'jsdoc',
'docs',
'sinon',
Expand Down

1 comment on commit ff34277

@aekeus
Copy link
Member

@aekeus aekeus commented on ff34277 Mar 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ nice

Please sign in to comment.