codecheck-build-size
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

CodeCheck Build Size

Installation

yarn add --dev codecheck-build-size

or

npm install --dev codecheck-build-size

Usage

Add to your codecheck.js file:

import { buildSize } from "codecheck-build-size";

export async function main() {
  await buildSize({
    files: [
      { path: "./build/static/js/*.js", maxSize: "1MB" },
      { path: "./build/static/css/*.css" },
      { path: "./build/static/images/*.jpg" },
    ],
  });

  // ...
}

API

await buildSize({
  gzip?: boolean, // should we track raw file size or after gzipping? default to true
  files: [
    {
      path: string, // glob supporting path to files
      maxSize?: number | string, // optional maximum allowed size. Can be a number meaning bytes or string like "1MB" or "100KB".
    },
  ];
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.10
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.10
    1
  • 0.0.9
    0

Package Sidebar

Install

npm i codecheck-build-size

Weekly Downloads

1

Version

0.0.10

License

MIT

Unpacked Size

210 kB

Total Files

50

Last publish

Collaborators

  • krzkaczor