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

mazehall

v2.1.0

Published

Application framework with flexible module management and a streaming interface. Command line interface supported.

Downloads

9

Readme

Mazehall

Mazehall is a flexible module loader system. Build on top of the Reactive Programming library Kefir.

An express interface is included. Stream all your routes into your app or configure a mask on startup.

Installation

$ [sudo] npm install --save mazehall

Usage

Manually case

Create your own new application with an testable app.js like:

var mazehall = require('mazehall');
var express = require('express');

var app, server;
app = express();
server = require('http').Server(app);

mazehall.moduleStream.log('module loader');
mazehall.initExpress(app);

module.exports = server;

and a startup file server.js like:

var server = require('./app.js');

var port;
port = process.env.PORT || 3000
server.listen(port, function() {
  console.log('server listen on port: ' + port);
});

Command line case

Let's do it mazehall cli.

$ [sudo] npm install mazehall -g

A global installation is an optional step. You could also call the cli interface in the node_modules/.bin directory.

mkdir myapp
cd myapp
mazehall init

At this point you have an mazehall application with express integration. Now you need at least an application module.

mazehall module gui

That's all.

npm start

server listen on port: 3000
module loader <value> { module: 'gui', components: [ 'ui', '' ] }

API

Module loader interface

  • mazehall.moduleStream

    • handle a module stream bus
    • could be used for logging and custom interfaces
  • mazehall.loadStream([options])

    • starts the module loading stream
  • mazehall.initExpress(app [, options])

    • starts the module enable stream and processing for express interface

Module interface

By default Mazehall is looking for modules in the app_module/* directories. Place a package.json file in the modules and add at least the mazehall: true key. More complex scenarios uses the components: ['restapi','admin'] array to handle the enabled modules. See also the mazehall-seed example app.

An example package.json

    {
      "name": "moduleGui",
      "version": "0.1.0",
      "description": "User Interface",
      "main": "index.js",
      "mazehall": true,
      "components": ["ui"],
      "author": "Jens Klose",
      "license": "MIT"
    }

Plugin interface

Plugins are first class Node/Io.js modules. They stay in the node_modules directory but don't shipped in package.json. They are managed by mazehall and are by default not persisted.

You need your own application logic and infrastructure to build things like extensions-store or so on.

Usage

  mazehall-plugin [install|remove|update] [name]

Environment variables

Component Id

    MAZEHALL_COMPONENTS = 'api,cloud'
  • string to identify the kind of server process like 'jsonApi' or 'admin'
  • 'core' processes load all modules
  • non core like 'admin' loads only the admin modules from the core

Run Tests

  $ npm test

License: MIT

Author: [Mazehall]