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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jspm-bundler

v0.1.11

Published

more configurable bundler for jspm

Readme

jspm-bundler

A configurable bundler for JSPM. Saves bundle manifest to an external JS file (instead of your config.js) so that it can be easily excluded from git repos and updated independently of the config.js.

  • Bundle/unbundle specific groups
  • Easier management of exclusions (exclude groups or packages)
  • Bust cached bundles using generated file checksums
  • Support for self-extracting bundles (aka static builds)

NPM

Installation

npm install jspm-bundler --save-dev

Usage

In your HTML

<script src="jspm_packages/system.js"></script> <!-- SystemJS -->
<script src="config.js"></script> <!-- your SystemJS config -->
<script src="bundles.js"></script> <!-- your bundleFile -->

In gulpfile or other Node build script.

var Bundler = require('jspm-bundler');

var bundler = new Bundler({

    baseURL: '',                // Must be the same baseURL as SystemJS.
    configFile: '',             // System config (defaults to config.js)
    packagePath: '',            // Path to package.json (defaults to root)

    // Paths are relative to your baseURL.
    dest: 'bundles',            // Path to folder where bundles are saved.
    file: 'bundles.js',         // JS file where bundle manifest is written.

    bust: false,                // Use file checksums to bust cached bundles,
                                // does not work on self-extracting builds.

    builder: {                  // Global build options passed to jspm.Builder.

        sfx: false,             // Self-extracting bundle with buildStatic().
        minify: false,
        mangle: false,
        sourceMaps: false,
        separateCSS: false,
        lowResSourceMaps: true,

        config: {               // Config file overrides.
            map: {},
            meta: {},
            paths: {}
            ...
        }
    },

    bundles: {
        groupName: {            // Group name (whatever you want).

            bundle: true,       // Whether to bundle this group.
            combine: false,     // Combine items together via addition.
            exclude: [],        // Exclude groups or packages via subtraction.

            // Items can be a simple array of packages and/or application files.
            // Globs or wildcards are not supported.  Bundles are created by
            // traversing a dependency graph, so start with an entrypoint.
            // Do not use file extensions, SystemJS assumes .js extensions.

            items: [
                'angular',
                'jquery',
                'source/app'
            ],

            // Items can also be an object that specifies entry as key
            // and a different output filename (no file ext) as value

            items: {
                'source/app': 'distbundle'
            },

            builder: {          // Options override the global builder options.
                sfx: false,
                minify: false,
                mangle: false,
                sourceMaps: false,
                separateCSS: false,
                lowResSourceMaps: true,
                config: {
                    map: {},
                    meta: {},
                    paths: {}
                    ...
                }
            }
        }
    }
});

Bundle all groups in your bundle configuration

bundler.bundle().then(function(){
    console.log('bundled all groups');
});

Bundle just specific groups

bundler.bundle(['app','routes']).then(function(){
    console.log('bundled just the app and routes');
});

Remove entire bundle config

bundler.unbundle().then(function(){
    console.log('all bundle configuration removed');
});

Remove individual bundle configs

bundler.unbundle(['routes']).then(function(){
    console.log('bundle configuration removed for just routes');
});

Examples

Example Gulpfile

Example Bundle Config

Example SFX Build Config