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

modulable

v0.0.2

Published

Easy way to create modulable apps

Downloads

8

Readme

Modulable

Modulable is the easy way to bootstrap and create a modular, customisable and extensible app.

The main principle of this plugin is :

  • everything is a module
  • a module is typed (belongs to module container)
  • a package provides and/or use a list of modules
  • you app loads modules
  • you must use a standard sequence of events to launch core modules (bootstrap)

Modulable is strongly based on NPM, and provides a common layer between the app, it's modules and common NodeJS components like express, swig, etc ...

The main goals are :

  1. Have a common interface over components, that lets you build apps more easily : chose a framework and gogogo

  2. Make an open and modular app by enabling others to provide plugins

Sample code

A common way to start an application :

// initialize the application
var app = require('modulable')(
  // the application structure
  __dirname + '/package.json'
  // inject some application specific configuration
  , __dirname + '/config.json'
);

// run the application :
app
  // initialize the http mode
  .trigger('web', 'init')
  // initialize each plugin
  .trigger('plugin', 'start')
  // starts the application in http mode
  .trigger('web', 'start')
;

Install

At first install the modular NPM package as a global script, that will add some extra cli powers :

npm install modulable -g

Go to the root of your project, and initialize your project with modular :

modulable --init

This command will :

  • create (or check) the package.json file
  • update the package.json file with a modular configuration
  • create an empty config.json file
  • create a default app.js file if not exists

After this setup, you will be able to add some extra packages :

modulable install mod-core-express --save
modulable install mod-core-swig --save

And also create some plugins for your app :

modulable create plugin:hello --save
modulable create plugin:world --save

The work is still in progress here ...