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

requiram

v0.1.0

Published

A Node.js package that concatenates and uglify modules from requirejs and serve them as a unique file and makes them work in the front end.

Readme

requiram

A node.js package to concatenate and uglify all files of require.js project and serve them as a unique file + a requiram.js tiny library to make them run.

If you are using require.js library front end and node.js back end and you want to make it live but you dont want to get a server request for each and every module loading. This may become very time consuming when you scale up your application. You should then concatenate and compress your modules and make them work on the front end. requiram permits to solve this problem very quickly, with almost no change in your code.

How does it work ?

First you should create a .json file with the list of your modules to be included and the module to be launch on initialization.

Let's say you want to generate the file app.js. You should then create a file named app.json and put it in the source directory with all your modules:

{
        "modules":["module1","module2","module3"],
        "startup":"main"
}

If you give a startup module, like here main.js, the module is launched when the file is loaded.

In the node.js part, you have to use Requiram middleware.

app.use( '/requiram', requiram.static({
                        src:__dirname+'/sourceDirectory',
                        dest:__dirname+'/destinationDirectory',
                        minify:false
                    }) );

minify parameter is optional. Default value is true.

The middleware is now mounted to the path /requiram. In your HTML file you should include these 2 lines:

<script type="text/javascript" src="/requiram/lib.js"></script>
<script type="text/javascript" src="/requiram/app.js"></script>

The lib.js should be added once, in the top of the list, to permit to your modules to work.

What if my modules are modified?##

The final file (here app.js) is created on the first time it is invoqued. Modification date is not checked. So to rebuild it, you should just just relaunch node.js.