JSPM

  • Created
  • Published
  • Downloads 270
  • Score
    100M100P100Q91885F
  • License MIT

Package Exports

  • package-build-stats

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (package-build-stats) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This is the function that powers the core of building, minifying and gzipping of packages in bundlephobia.

Commands

To start an local server that builds packages, run -

yarn run start

The server runs at port 3000.

Making requests

To build a package and get it's stats, run a curl request like so -

curl 'localhost:3000/size?p=<package-name>'

eg.

curl 'localhost:3000/size?p=react'

Contributing

Clone the repo, npm install, and run the server. There isn't any autorestart or hot reloading as of now, so the server will need to be manually restarted on code changes. The file you're probably looking for is getPackageStats.js