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 🙏

© 2024 – Pkg Stats / Ryan Hefner

banal

v1.6.3

Published

On-demand bundle analyzer, powered by esbuild.

Downloads

230

Readme

Banal

On-demand bundle analyzer, powered by esbuild.

Features

This little terminal app exists because Bundlephobia and bundlejs are pretty cool and useful, but bundling locally and with offline support can easily work more reliably.

  • Simple: the way this app works is super simple, it just generates the metadata file for the bundler analyzer in a temporary directory, embeds it inside the bundle analyzer itself, and opens it.
  • Secure: postinstall scripts are disabled for security reasons, and only dependencies I personally maintain and esbuild are used.
  • Available: unless NPM itself is unreachable, or esbuild can't bundle your modules, this bundle analyzer will always be available.
  • Customizable: some important options, like the target platform or the target format, can be configured. Unlike in Bundlephobia where for many modules bundling will just fail.
  • Offline support: esbuild's amazing bundle analyzer is embedded within the app, so the analysis can potentially even work if you are offline, if NPM has the modules you want to analyze cached already.
  • Sharing support: a single HTML file is generated, specific to the analyzed modules, so it can be shared trivially.

Install

npm install -g banal

Usage

https://github.com/fabiospampinato/banal/assets/1812093/554327fa-c070-44af-89fb-52eff57a70ce

Some example usages:

# Analyze a single module
banal crypto-sha

# Analyze a single module, at a specific version
banal [email protected]

# Analyze a single module, with the module flag set explicitly (optional)
banal -m crypto-sha

# Analyze a single local module
banal ./src/index.ts

# Analyze a single namespaced module
banal @fabiospampinato/is

# Analyze multiple modules together
banal crypto-sha crypto-puzzle

# Analyze a Node module
banal -p node -m banal

# Analyze a single module with a custom entry file
banal -m @fabiospampinato/is -e 'export {isWeakRef} from "@fabiospampinato/is";'

Related

  • Banal for VSCode: The official companion extension for Banal, for quickly inspecting the bundle size of npm dependencies.

License

  • App: MIT © Fabio Spampinato
  • Bundler & Analyzer: MIT © @evanw