Closed deadlyfingers closed 8 years ago
Done a first pass at this with > 50 MB savings by removing:
node_modules+'**/test/*',
node_modules+'**/tests/*',
node_modules+'**/examples/*',
node_modules+'**/*.gif',
node_modules+'**/*.jpg',
node_modules+'**/*.png',
node_modules+'**/*.md',
node_modules+'**/*.css',
node_modules+'**/*.html'
Results:
141.5 MB => 86.7 MB
16,161 => 12,290 items
Second pass including:
node_modules+'**/component.json',
node_modules+'**/bower.json',
node_modules+'**/pouchdb/docs/**/*',
Results
=> 85.7 MB
=> 11,811 items
As we are deleting files that we reckon to be unnecessary we would need to test everything still works... So until we are confident it works 100% it can be run using gulp:
gulp build
gulp trim:node_modules
cordova build
If something breaks then use gulp to reset the build:
gulp clean
Add gulp build script to trim 'node_modules' of unnecessary files.