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

@omkarj13/bundler

v1.0.8

Published

A minimal JavaScript bundler

Readme

Bundler

This is a minimal JavaScript bundler. It bundles, tree-shakes and minifies JavaScript modules out of the box.

Features

  • Scope Hoisting: Combines modules into a single scope to minimize runtime overhead.
  • Tree-Shaking: Automatically removes dead code to output the smallest bundle possible.
  • Minification: Compresses the final bundle even further by removing unnecessary characters.
  • Minimalist Core: A small, focused codebase that's easier to understand.

Usage

You can use Bundler to bundle your JavaScript projects from the command line.

npx @omkarj13/bundler bundle --entry ./src/index.js --output ./dist/bundle.js

Options

| Option | Description | Default | | ------------- | -------------------------------------- | ------------------- | | --entry | The entry point of your application. | (required) | | --output | The path to write the bundled file to. | (required) | | --treeshake | Enable or disable tree-shaking. | true | | --minify | Minify the output bundle. | true | | --config | Path to a configuration file. | bundler.config.js |

Configuration File

You can also configure Bundler using a bundler.config.js file:

// bundler.config.js
export default {
  entry: './src/index.js',
  output: './dist/bundle.js',
  minify: true,
  treeshake: true,
};

How It Works

This bundler processes JavaScript modules in the following sequence:

  1. Parsing & Dependency Graph Construction: It starts from the entry file, parsing the code into an Abstract Syntax Tree (AST). It then traverses the import statements to discover all dependencies, building a complete graph of your project's modules.

  2. Tree Shaking: The dependency graph is analyzed to identify and remove any code that is not actually used in the project, which helps to reduce the final bundle size.

  3. Deconflicting Identifiers: To prevent naming collisions when all the modules are combined, the bundler intelligently renames variables as needed.

  4. Scope Hoisting: The import and export statements, which are specific to modules, are transformed and rewritten so that all the code can exist within a single scope.

  5. Code Generation: Finally, the transformed code from all modules is concatenated, minified, and a single bundled JavaScript file is generated.

Development

To get started with development:

  1. Clone the repository:
    git clone https://github.com/OmkarJ13/bundler.git
  2. Install dependencies:
    npm install
  3. Run the tests:
    npm test

Future Scope & Contributions

There are many opportunities to expand the capabilities of this project, and contributions are welcome! Some of the features that could be added in the future include:

  • Source Maps: To make debugging bundled code easier.
  • Code Splitting: To split the bundle into smaller chunks that can be loaded on demand.
  • Plugin System: To allow for custom transformations and optimizations.

If you're interested in contributing, feel free to open an issue or submit a pull request.


Built with ❤️ by OmkarJ13.