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

@weborigami/esbuild

v0.0.14

Published

This [Origami](https://weborigami) package provides a way to bundle JavaScript and TypeScript resources with [esbuild](https://esbuild.github.io/). This effectively turns esbuild into a function:

Readme

This Origami package provides a way to bundle JavaScript and TypeScript resources with esbuild. This effectively turns esbuild into a function:

esbuild(tree) → bundles

This function accepts a tree defined in any way (files, data file, in memory object, server resources, etc.) and return one or more bundles. This gives you a flexible way of defining where the esbuild input is coming from, it also lets you incorporate the esbuild output into your Origami project without a separate build step.

Usage

  1. Add this @weborigami/esbuild extension to your Origami project's dependencies and npm install.
  2. In your site definition, call the extension and pass in the tree of JavaScript you want to bundle.
// site.ori
{
  index.js: package:@weborigami/esbuild(js)
}

As shown above, by default the esbuild function bundles all .js files in the given tree into a single JavaScript file.

The esbuild function accepts a second options parameter that will be passed to esbuild; see esbuild's options documentation for details. This can be used to, for example, set entryPoints and other bundling options. The esbuild function itself sets the outdir and write options to enable virtual files; those cannot be overridden. It also sets the default value of bundle to true and format to "esm".

Another example is to ask for source maps:

{
  ...package:@weborigami/esbuild(js, { sourcemap: true })
}

In a situation like this, esbuild will return multiple files. The Origami ... spread operator can be used to incorporate the multiple files into the tree for the site. Here esbuild will return index.js and index.js.map files, so both will be added to the site.

Because Origami treats all trees equally, you can use Origami's many tree operations to compose, filter, or otherwise organize the input files before passing them to esbuild.

You can also obtain the tree of JavaScript or TypeScript from other locations. For example, js.yaml demonstrates a tiny set of JavaScript modules defined in a YAML file. This could be passed to the esbuild function directly:

{
  index.js: package@weborigami/esbuild(js.yaml)
}

Similarly, the ts.yaml file can be substituted to show the bundling of TypeScript files.