Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(pack): reduce bundled files published #392

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PixnBits
Copy link

reduces size on disk from 2MB to <400kB, potential audit false-positive surface area

current:

$ npm pack
npm notice 
npm notice 📦  [email protected]
npm notice === Tarball Contents === 
npm notice 216B    .editorconfig                  
npm notice 1.3kB   LICENSE                        
npm notice 162.7kB src/media/reset.ai             
npm notice 4.4kB   tests/assets/qunit.css         
npm notice 1.3kB   demo/custom-controls.html      
npm notice 3.2kB   demo/custom-event-handlers.html
npm notice 2.1kB   demo/dynamic-load.html         
npm notice 605B    demo/embed.html                
npm notice 668B    demo/img.html                  
npm notice 1.0kB   index.html                     
npm notice 2.2kB   tests/index.html               
npm notice 73.7kB  demo/inline-viewbox-zoomed.html
npm notice 73.7kB  demo/inline-wide.html          
npm notice 74.3kB  demo/inline.html               
npm notice 1.9kB   demo/layers.html               
npm notice 2.4kB   demo/limit-pan.html            
npm notice 3.6kB   demo/mobile.html               
npm notice 349.1kB demo/multi-instance.html       
npm notice 648B    demo/object.html               
npm notice 433B    demo/require.html              
npm notice 1.3kB   demo/resize.html               
npm notice 2.5kB   demo/simple-animation.html     
npm notice 1.6kB   demo/sinchronized.html         
npm notice 1.9kB   demo/thumbnailViewer.html      
npm notice 31.0kB  demo/wikipathways.html         
npm notice 190.3kB tests/assets/blanket.js        
npm notice 77B     src/browserify.js              
npm notice 9.5kB   src/control-icons.js           
npm notice 2.2kB   gulpfile.js                    
npm notice 67.6kB  demo/hammer.js                 
npm notice 95.9kB  demo/jquery.min.js             
npm notice 95.8kB  tests/assets/jquery.min.js     
npm notice 63.2kB  tests/assets/qunit.js          
npm notice 221B    demo/require-main.js           
npm notice 6.5kB   server.js                      
npm notice 9.0kB   src/shadow-viewport.js         
npm notice 507B    src/stand-alone.js             
npm notice 65.6kB  dist/svg-pan-zoom.js           
npm notice 26.0kB  src/svg-pan-zoom.js            
npm notice 29.8kB  dist/svg-pan-zoom.min.js       
npm notice 7.5kB   src/svg-utilities.js           
npm notice 15.3kB  tests/test_api.js              
npm notice 7.0kB   demo/thumbnailViewer.js        
npm notice 3.9kB   src/uniwheel.js                
npm notice 8.2kB   src/utilities.js               
npm notice 49B     .eslintrc.json                 
npm notice 2.4kB   package.json                   
npm notice 403B    tsconfig.json                  
npm notice 134B    tslint.json                    
npm notice 1.5kB   ISSUE_TEMPLATE.md              
npm notice 22.0kB  README.md                      
npm notice 25.8kB  svg-pan-zoom-logo.png          
npm notice 33.0kB  demo/pathway.svg               
npm notice 2.7kB   src/media/reset.svg            
npm notice 10.4kB  svg-pan-zoom-logo.svg          
npm notice 68.7kB  demo/tiger.svg                 
npm notice 68.7kB  tests/assets/tiger.svg         
npm notice 224.2kB demo/Tux.svg                   
npm notice 6.6kB   dist/svg-pan-zoom.d.ts         
npm notice 3.0kB   tests/test_typescript.ts       
npm notice === Tarball Details === 
npm notice name:          svg-pan-zoom                            
npm notice version:       3.6.1                                   
npm notice filename:      svg-pan-zoom-3.6.1.tgz                  
npm notice package size:  681.3 kB                                
npm notice unpacked size: 2.0 MB                                  
npm notice shasum:        1132bab2cafdc2954d61098c9816c56506a983f6
npm notice integrity:     sha512-Q/TeYEib+S3w9[...]j2+V6XJS8nBXA==
npm notice total files:   60                                      
npm notice 
svg-pan-zoom-3.6.1.tgz

after this diff:

$ npm pack
npm notice 
npm notice 📦  [email protected]
npm notice === Tarball Contents === 
npm notice 1.3kB   LICENSE                 
npm notice 162.7kB src/media/reset.ai      
npm notice 77B     src/browserify.js       
npm notice 9.5kB   src/control-icons.js    
npm notice 9.0kB   src/shadow-viewport.js  
npm notice 507B    src/stand-alone.js      
npm notice 65.6kB  dist/svg-pan-zoom.js    
npm notice 26.0kB  src/svg-pan-zoom.js     
npm notice 29.8kB  dist/svg-pan-zoom.min.js
npm notice 7.5kB   src/svg-utilities.js    
npm notice 3.9kB   src/uniwheel.js         
npm notice 8.2kB   src/utilities.js        
npm notice 2.4kB   package.json            
npm notice 22.0kB  README.md               
npm notice 2.7kB   src/media/reset.svg     
npm notice 6.6kB   dist/svg-pan-zoom.d.ts  
npm notice === Tarball Details === 
npm notice name:          svg-pan-zoom                            
npm notice version:       3.6.1                                   
npm notice filename:      svg-pan-zoom-3.6.1.tgz                  
npm notice package size:  173.2 kB                                
npm notice unpacked size: 357.7 kB                                
npm notice shasum:        bfedfea0e935170bb3f254a9aae6fbbdabab48ac
npm notice integrity:     sha512-bjdZlGhKiBdD9[...]SIPm5gyhtMxmg==
npm notice total files:   16                                      
npm notice 
svg-pan-zoom-3.6.1.tgz

reduces size on disk from 2MB to <400kB, potential audit false-positive surface area
@@ -3,3 +3,4 @@ node_modules/
**/*.orig
.DS_Store
npm-debug.log
*.tgz
Copy link
Author

Choose a reason for hiding this comment

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

avoids including a tgz from a previous $ npm pack in another run, especially useful when actually publishing 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant