Comments (5)
actually you effectively have an endpoint of /package after forking your code. I'd like to piggy back on this and create a node command line utility that parses your package.json and gives you these values of the combined size of all your packages. If I submit for example react react-redux (which depends on react) and add them up, is that an accurate number for how big the both of them are in your project?
from bundlephobia.
Doing so has a couple of challenges -
-
People often have non-front end dependencies in their package.json. So unless you allow them to select which packages to include, the results wouldn't be very helpful.
-
Unless the cost packages are cached ( although a good number of popular packages are) the time taken to build and minify a large number packages can be too much (think about the time taken to run production webpack builds). So it kinda becomes like running a webpage test, and you have to build the support framework for queuing stuff and showing progress etc.
I'd be happy to know if you have workarounds, or would want to work on either.
from bundlephobia.
https://github.com/shaun-sweet/package-weight
here's what I made so far. I do think your first point could be an issue but perhaps I could put in an exclude flag into the utility. I guess your server would need to cache that info. Last I saw though it seemed you were using firebase to cache to avoid having to re zip and calc stuff?
from bundlephobia.
Hey @shaun-sweet. Despite of the caching, I don't think the heroku instance would be able to bear the load of multiple people scanning their package.json
. There are just too many packages out there and they update quite frequently. The firebase cache is a lazy cache and unless we add queueing and get a better hosting, this will not work out.
I don't think exposing this as an API is a good idea atm with the current infrastructure.
from bundlephobia.
We now support scanning package.json
from within bundlephobia.com (beta) Let me know what you think once you get your hands on.
from bundlephobia.
Related Issues (20)
- Package suggestion: ky for `HTTP client libraries for Node.js`
- Package suggestion: <react muliti carousel> for `Vanilla JS Sliders & Carousels`
- data URI is reported as a missing dependency
- [Improvement] Calulate package size from bin property
- 502 server when querying any package HOT 2
- Package suggestion: lexical for `Rich Text Editors`
- Package suggestion: `@react-hookz/deep-equal` for `Deep Equality Check`
- Failed to build this package with with no production dependency project
- Package suggestion: <package-name> for `Promise polyfills`
- Package suggestion: <victory> for `General purpose Charting libraries`
- Server down HOT 4
- [email protected] suggestion: <package-name> for `Vanilla JS Sliders & Carousels`
- BuildError: @radix-ui/react-dialog fails to build
- Package suggestion: yrel for `JSON schema validation`
- Package suggestion: <package-name> for `HTTP client libraries for Node.js`
- BuildError: @hellhub-collective/cli fails to build
- Package suggestion: [email protected] for `JSON schema validation`
- Package suggestion: <package-name> for `Tooltip Libraries`
- [email protected]: Ignoring the size of missing dependencies .. and .. HOT 1
- [email protected]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundlephobia.