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

express-stitch

v0.0.2

Published

Clientside package handling with stitch for express apps.

Readme

express-stitch

Simple tool for serving client-side apps built with stitch and express.js.

goals

make it easy to:

  • serve stitch packages dynamically while developing
  • write/serve minified versions of packages to disk for production use

install

npm install express-stitch

demo

A simple express server, example:

var express = require('express'),
    stitch = require('stitch'),
    stitcher = require('express-stitch');


// a simple stitch client-package
var clientApp = stitch.createPackage({
    paths: [__dirname + '/clientapp', __dirname + '/clientlib'],
    dependencies: [
        __dirname + '/public/jquery.js'
    ]
});

// set up express
var app = express();

app.configure(function () {
    // use gzip
    app.use(express.compress());
    // serve our 'normal' static files as usual
    app.use(express['static'](__dirname + '/public')); // our normal static files
});

// if production, also serve the files built by stitch
app.configure('production', function () {
    app.use(express['static'](__dirname + '/public/build'));
});

// our special stitch package. We pass in the package and options specifying
// where to write the minified file. Notice we write them to a directory called "build"
// by specifying items in this order, the static middleware will always intercept this
// route in production (since a file now exists at that path). So this particular handler
// never gets called.
app.get('/app.js', stitcher(stitchPackages.main, {writePath: __dirname + '/public/build/app.js'}));

// at this point our html can just point to /app.js and will either get the minified/static
// version in production and the dynamically served stitch package in dev.

app.listen(80);

options

{
    // whether to run through minifier before writing to disk. default is `true`
    minify: true, 
    // if you want to pass additional compression options to uglify's minify function, here's where you do it.
    uglifyConfig: {},
    // if you set this it will write the compiled file here. If left blank it won't write it to disk.
    writePath: '/path/something.js', 
    // serve: let's you optionally disable serving the dynamic package. `true` is the default.
    serve: true 
}

credits

Written by @henrikjoreteg. If you're an awesome person you should say hi to me on twitter.

license

MIT