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 🙏

© 2024 – Pkg Stats / Ryan Hefner

superjoin

v0.6.3

Published

Brings node.js like module loader support to the web

Downloads

23

Readme

Superjoin

Superjoin is a module loader for the web. It brings Node.js like require support to the front-end. It uses npm or bower as package storage and gives you the possibility to use your own local packages.

Installation

Superjoin is available on NPM the packagemanager for Node.js

The command to install it global:

npm install -g superjoin

If you prefer a local installation then remove the -g flag from install command.

Requirements

Node.js >= 4.2.0

Usage of Superjoin:

Superjoin can be configured with a superjoin.json file placed everywhere in your project. A minimum configuration looks like:

{
    "name": "myproject",
    "main": "index.js",
    "files": [
        "hello.js"
    ]
}

Superjoin parse all modules an includes submodules automatically. You mustn't add all your requirements in the superjoin file.

Run the build job

$ superjoin -o build.js

Run this command from the same folder where your superjoin.json file is. That command will create a bundle with all modules and their requirements.

Include the build file

Place this simple html snippet in the head of your index.html

<script type="text/javascript" src="build.js"></script>

Inside your code

//Load local modules
var myModule = require('./modules/myModule.js');

//Load from node_modules or bower_components
var $ = require('jquery');

The difference of local and npm/bower modules is the leading ./ or ../. If a module name starts with ./ or ../ it will be loaded as a local file. All other modules are being processed as npm or bower modules.

The loading order of npm/bower modules is the following:

  1. Tries to load it from bower_components. If no bower_module folder is found, tries to load it from a bower_components folder in the parent directory, until the root directory.

  2. Tries to load it from node_modules. If no bower_module folder is found, tries to load it from a node_modules folder in the parent directory, until the root directory.

  3. Tries to resolve the path as a local module.

  4. Throws a module not found error.

Read the full documentation

Superjoin as a plugin

Looking for plugins?

Superjoin plugin for Grunt.