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

micro-packager

v0.0.5

Published

Library to extract part of an npm package and create a new smaller npm package that contains only the component pieces required.

Readme

Micro Packager

Library to extract part of an npm package and create a new smaller npm package that contains only the component pieces required. Just point the packager to the main root file and the application will be spidered and pull in all required dependencies.

In addition to extracting the smaller application, there is also the option to deploy to AWS Lambda to run the smaller application as a function.

NOTE: This is a very rough first pass at the application. The actual process can be cleaned up but at the moment just trying to work on a PoC.

Usage

var packager = require('micro-packager');

// put all the options together...
var opts = {
    package_name: '',
    app_root: '',
    output_dir : '',
    root_file: '',
    execution_file: '',
    additional_files : [],
    required_modules: {},
    delete_temp_dir: false,
    remove_directories : [],
    include_node_modules : true
};

// Build the package...
packager.build(opts, function(err, results){
    console.log(arguments);
});

Options

  • package_name : The name that should be assigned to the new package.
  • app_root : The absolute path to the root of the parent/source application.
  • output_dir : The directory the zip file should be written to.
  • root_file : The file that should be used to start the spidering to get all the component pieces.
  • execution_file : The file that holds the code that will serve as the execution file in the new application.
  • additional_files : An array of any additional files that need to be included in the new application.
  • required_modules : An array of any additional npm modules that need to be included in the new application.
  • delete_temp_dir : If the temporary directory should be removed after creation. Default true.
  • remove_directories : An array of directories that should be removed to decrease the size of the application. In some cases npm modules have a build directory that can be removed after the npm install has run.
  • include_node_modules : If the node_modules directory should be included.