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

split-elm-bundle

v0.1.1

Published

Split the bundled JS code of multiple Elm programs into one .mjs file per program

Readme

This is a small command-line utility to split JavaScript bundles that the Elm compiler created into multiple ES modules.

See it in action on this page with example programs.

Copyright Marc Walter, 2024, licensed under the free EUPL-1.2. If you have other requirements, let's talk.

Usage

# Compile multiple Elm programs into one bundle
elm make --optimize --output=examples.js src/Clock.elm src/TextField.elm src/Quotes.elm

# split the bundle
npx split-elm-bundle examples.js

And then you can import a program e.g. like this:

<main id="elm"></main>
<script type="module">
  import { Clock } from './examples.Clock.mjs';
  const app = Clock.init({ node: document.getElementById('elm') });
</script> 

See the examples directory for more information.

CLI commands

Usage:
split-elm-bundle <options> <path/to/bundle.js>

With <options> one of
`--report=stdout` (default) will print log messages
`--report=json` will not print immediate logs, but only one JSON report in the end
`--dry-run` disables writing files to disk

Example JSON report

From running split-elm-bundle.mjs examples/elm-lang-website-examples/www/examples.js --report=json --dry-run

{
  "result": "split-programs-one-shared",
  "input": {
    "file": "examples/elm-lang-website-examples/www/examples.js",
    "sizes": { "raw": 253622, "gzip": 53453 }
  },
  "programs": [ "Animation", "TextField", "Quotes", "Mouse", "Cube", "Clock" ],
  "output": {
    "shared": {
      "file": "examples/elm-lang-website-examples/www/examples.shared.mjs",
      "sizes": { "raw": 117044, "gzip": 24391 }
    },
    "programs": [
      {
        "file": "examples/elm-lang-website-examples/www/examples.Animation.mjs",
        "sizes": { "raw": 7135, "gzip": 1514 }
      },
      {
        "file": "examples/elm-lang-website-examples/www/examples.TextField.mjs",
        "sizes": { "raw": 3783, "gzip": 1155 }
      },
      {
        "file": "examples/elm-lang-website-examples/www/examples.Quotes.mjs",
        "sizes": { "raw": 15273, "gzip": 3661 }
      },
      {
        "file": "examples/elm-lang-website-examples/www/examples.Mouse.mjs",
        "sizes": { "raw": 11375, "gzip": 2131 }
      },
      {
        "file": "examples/elm-lang-website-examples/www/examples.Cube.mjs",
        "sizes": { "raw": 40021, "gzip": 8833 }
      },
      {
        "file": "examples/elm-lang-website-examples/www/examples.Clock.mjs",
        "sizes": { "raw": 6791, "gzip": 1652 }
      }
    ]
  }
}