Nuns Practicing Misanthropy

    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".
        },
      ];
    })

    Keywords

    none

    Install

    npm i codecheck-build-size

    DownloadsWeekly Downloads

    2

    Version

    0.0.10

    License

    MIT

    Unpacked Size

    210 kB

    Total Files

    50

    Last publish

    Collaborators

    • krzkaczor