If you like this project, please star it & follow me to see what other cool projects I'm working on! ❤️
🙋♂️ Why?
🔍 Size analysis Quickly determine the total size of what you're publishing to npm!
🔥 Same behavior as npm pack/publish Collects publish files as specified in your package.json!
🙌 Gzip & Brotli See how your files compress in addition to normal size!
🤖 Node.js API Integrate size checks to your CI via Node.js API
🚀 Install
npm i pkg-size
🚦 Quick Usage
const pkgSize = require('pkg-size');// Get package size data from current working directoryconst sizeData = await pkgSize();// Get package size data from a specific package pathconst sizeData = await pkgSize('/path/to/package');