npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bun-squeeze

v0.1.3

Published

A chainable build wrapper for Bun, inspired by Laravel Mix.

Readme

Squeeze

A chainable build wrapper for Bun, inspired by Laravel Mix. Fast builds, sensible defaults, granular control when you need it.

Install

bun add -d bun-squeeze

Quick Start

// build.ts
import squeeze from 'bun-squeeze';

await squeeze()
  .js('js/app.js', 'js/[name]-[hash].js')
  .css('css/app.css', 'css/[name]-[hash].css')
  .copy('fonts', 'fonts')
  .images('img', 'img')
  .build();
bun build.ts                  # one-off build
bun build.ts --production     # minified, hashed
bun build.ts --watch          # rebuild on change

Production mode is enabled by --production or NODE_ENV=production.

API

squeeze(options?)

Creates a new build instance.

| Option | Default | Description | |--------|---------|-------------| | src | 'src' | Source root — all paths are relative to this | | dist | 'dist' | Output root |

.js(src, dest, options?)

Bundle a JavaScript/TypeScript entrypoint.

squeeze()
  .js('js/app.js', 'js/[name]-[hash].js')
  .js('js/editor.js', 'js/[name]-[hash].js', { splitting: false })

| Option | Default | Description | |--------|---------|-------------| | enabled | true | Skip this task when false | | splitting | true | Code splitting for shared chunks | | minify | true in production | Minify output | | sourcemap | 'external' in dev, 'none' in production | Sourcemap mode | | external | [] | Modules to exclude from the bundle | | define | {} | Compile-time constants | | plugins | [] | Bun plugins | | root | — | Root directory for entrypoint resolution |

.css(src, dest, options?)

Bundle a CSS entrypoint.

squeeze()
  .css('css/app.css', 'css/[name]-[hash].css')

| Option | Default | Description | |--------|---------|-------------| | enabled | true | Skip this task when false | | minify | true in production | Minify output | | plugins | [] | Bun plugins (e.g. bun-plugin-tailwind) |

.copy(src, dest, options?)

Copy a directory to the output, preserving structure.

squeeze()
  .copy('fonts', 'fonts')

| Option | Default | Description | |--------|---------|-------------| | enabled | true | Skip this task when false |

.images(src, dest, options?)

Optimise images with sharp. JPEG, PNG, and WebP are compressed; other files are copied as-is.

Requires sharp as a peer dependency: bun add -d sharp

squeeze()
  .images('img', 'img', { quality: 90 })

| Option | Default | Description | |--------|---------|-------------| | enabled | true | Skip this task when false | | quality | 85 | Quality for JPEG and WebP (1–100) | | pngCompression | 9 | PNG compression level (0–9) |

.build(options?)

Run all registered tasks and write a manifest file.

await squeeze()
  .js('js/app.js', 'js/[name]-[hash].js')
  .build({ manifest: 'dist/manifest.json' });

| Option | Default | Description | |--------|---------|-------------| | manifest | 'dist/manifest.json' | Path to write the asset manifest, or false to disable |

The manifest maps logical filenames to their hashed equivalents:

{
  "js/app.js": "js/app-t7epaa3e.js",
  "css/app.css": "css/app-r2d1f9k3.css"
}

Tailwind CSS

Pass bun-plugin-tailwind as a plugin:

import tailwind from 'bun-plugin-tailwind';

await squeeze()
  .css('css/app.css', 'css/[name]-[hash].css', { plugins: [tailwind] })
  .build();

Licence

MIT