package-build-stats
```js const getBuiltPackageStats = require('package-build-stats');
Last updated 8 months ago by pastelsky .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install package-build-stats 
SYNC missed versions from official npm registry.
<img src="https://img.shields.io/npm/l/package-build-stats.svg"

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

Usage

const getBuiltPackageStats = require('package-build-stats');

getBuiltPackageStats('packageName', { options })
    .then((result) => console.log(result))

Options

Option Values Description
client 'npm' or 'yarn' Which client to use to install package for building
limitConcurrency true or false When using yarn as the client, use the network mutex to limit concurrency
networkConcurrency number When using yarn as client, limit simultaneous installs to this number.
customImports Array<string> By default, the default export is used for calculating sizes. Setting this option allows calculation of package stats based on more granular top-level exports.

Testing results using in-built server in development

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. The file you're probably looking for is getPackageStats.js

Current Tags

  • 4.1.0                                ...           latest (8 months ago)

50 Versions

  • 4.1.0                                ...           8 months ago
  • 4.0.5                                ...           8 months ago
  • 4.0.4                                ...           8 months ago
  • 4.0.3                                ...           8 months ago
  • 4.0.2                                ...           9 months ago
  • 4.0.1                                ...           9 months ago
  • 4.0.0                                ...           9 months ago
  • 3.5.6                                ...           a year ago
  • 3.5.5                                ...           a year ago
  • 3.5.4                                ...           a year ago
  • 3.5.3                                ...           a year ago
  • 3.5.2                                ...           a year ago
  • 3.5.1                                ...           a year ago
  • 3.5.0                                ...           a year ago
  • 3.4.1                                ...           a year ago
  • 3.4.0 [deprecated]           ...           a year ago
  • 3.3.1                                ...           a year ago
  • 3.3.0                                ...           a year ago
  • 3.2.2                                ...           a year ago
  • 3.2.1                                ...           a year ago
  • 3.2.0                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.4.0                                ...           2 years ago
  • 2.3.4                                ...           2 years ago
  • 2.3.3                                ...           2 years ago
  • 2.3.2                                ...           2 years ago
  • 2.3.1                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.3                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1 [deprecated]           ...           2 years ago
  • 2.1.0 [deprecated]           ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2 [deprecated]           ...           2 years ago
  • 2.0.1 [deprecated]           ...           2 years ago
  • 2.0.0 [deprecated]           ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 52
Dependencies (30)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |