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

helios-merge

v0.1.2

Published

Tool for merging Helios Kernel modules

Downloads

3

Readme

helios-merge — merges Helios modules

helios-merge is a command-line tool which bundles JavaScript modules based upon the Helios Kernel module format. This tool can be used to prepare a library internally managed as several Helios Kernel modules to release as a plain JavaScript file (suitable for using without Helios Kernel), or to simply get a bundled module suitable for further minimizaiton. helios-merge is based upon the Esprima and Escodegen projects.

Installation

Install helios-merge using npm:

$ sudo npm install helios-merge -g

Optionally you may download the distribution using this link. In latter case you will have to launch it as node path/to/helios-merge.js instead of simply helios-merge in the examples below.

Usage

$ helios-merge --input=path --output=path [additional options]

Options:

--input path of the main module to start merging from (defaults to ./main.js)

--output path to write the bundled script into. After the bundle is prepared, it could be reused instead of the original file (provided to the --input option) with the same effect

--quiet suppress informational messages display

--plain create a plain .js file suitable to be used without Helios Kernel (implies --scope=global)

--scope=subdir (default) — bundle only the scripts in the directory and subdirectories. All modules outside of the bundling scope will be treated as external dependencies and will be included into the bundled module head using the include() function of Helios Kernel

--scope=local bundle all sources available by a local path, but treat remote dependencies as external

--scope=global bundle all local and remote files (paths starting form http://...)

--help or whatever unrecognized — show help message

Example

In this example we have a library splitted between several modules relying on each other, and we are going to merge it into a single module. The source of the artificial example library could be like this:

./myLibrary.js — main library module, provides a method to say 'Hello World!':
include('./base.js');
include('./print.js');

init = function() {
    myLibrary.helloWorld = function() {
        myLibrary.print('Hello World!');
    }
}
./print.js — prints a given message:
include('./base.js');

init = function() {
    myLibrary.print = function(text) {
        console.log(text);
    }
}
./base.js — declares library object:
init = function() {
    myLibrary = {};
}

Bundling the library using helios-merge like this:

$ helios-merge --input=./myLibrary.js --output=./myLibraryBundled.js

The generated myLibraryBundled.js will contain the code of all modules sorted in order of dependence and will behave like this:

init = function() {
    myLibrary = {};

    myLibrary.print = function(text) {
        console.log(text);
    }

    myLibrary.helloWorld = function() {
        myLibrary.print('Hello World!');
    }
}

This code demonstrates the behaviour of the generated bundle, but in fact the code of each original module will additionally be wrapped into an anonymous function to make use of local variables declared in each original module's initializer.

Bitdeli Badge