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

yanpm

v1.2.0

Published

Yet Another Node Plugin/Package Manager

Downloads

31

Readme

yanpm - Yet Another Node Plugin/Package Manager

Build Status Coverage Status License

Dependency Status devDependency Status NPM

Description

Gives your node app/server the "Ya!" that it needs!

Better Description

Config based Plugin manager to load dependencies at run time. This allows for frameworks (e.g. yanpm) to have default core plugins that swapped out later but without added bloat.

TODO

[ ] run sync mode
[?] better name
[ ] logo
[?] change to singleton
[ ] smart install, to prevent git repo from auto resintall every time it's ran
[ ] only require modules on .get
[ ] better Readme
[ ] move require remove cache utils to it's own project
[ ] website

v1.0.0 - Release

[x] npm 3+ support
[x] remove npm module as dependancy
[x] Hide/Handle NPM console message
[x] promise style return on .install (use to be .load)
[x] proper private repo support

using install

var yanpm  = require('yanpm');
var plugin = new yanpm();

plugin
    .install('lodash')
    .then(function(){
        console.log('Done loading plugins');

        var _ = plugin.get('lodash');
        console.log("lodash version:", _.VERSION);
    });

using add

var yanpm  = require('yanpm');
var plugin = new yanpm();

plugin
    .add(['lodash', 'stumpy'])
    .install()
    .then(function(){
        console.log('Done loading plugins');

        var _ = plugin.get('lodash');
        console.log("lodash version:", _.VERSION);
    });

yanpm config

var yanpm  = require('yanpm');
var stumpy  = require('stumpy');
var plugin = new yanpm({
 cwd: './', // current dir yanpm will use for the installs
 logger: new stumpy()); // logger yanpm will use
});

// WARN!
// yanpm uses your current NPM under the hood
// in some cases when trying to install in a dir
// if "package.json" is missing npm will search up the tree

plugin
    .install('_', 'lodash'])
    .then(function(){
        console.log('Done loading plugins');

        var _ = plugin.get('_');
        console.log("lodash version:", _.VERSION);
    });

More complex usage:

plugin
    .add("logger",   "[email protected]")
    .add("template", "ejs",        "yanpm-ejs")
    .add("template", "handlebars", "yanpm-handlebars");

plugin
    .add([{
         "name": "logger",
         "group": "util",
         "package": "[email protected]",
         "factory": function (Stumpy) { return new Stumpy(); }
     }]);

Other Supported Formats:

plugin
     .add("lodash") // get latest
    
     .add("[email protected]") // get specific version
    
     .add("_", "[email protected]")
    
     .add("util", "_", "[email protected]")
    
     .add("util", ["lodash", "moment"])
     .add("util", [{
         "name": "logger1",
         "package": "[email protected]",
         "factory": function (Stumpy) { return new Stumpy(); }
     }])
     .add("util", { "logger2": {
         "package": "stumpy",
         "factory": function (Stumpy) { return new Stumpy(); },
         "arguments": [
             "Logger2",
             {
                 showTrace: true,
                 showLogId: true,
                 showLogType: true
             }
         ]
     })
    
     .add(["lodash", "moment"])
     .add([
         {
            "group": "util",
            "name": "logger1",
            "package": "[email protected]",
            "factory": function (Stumpy) { return new Stumpy(); }
         }
     ])
    
     .add({
        "util": "lodash"
     })
     .add({
        "util": [ "lodash" ]
     })
    
     .add({
         "util": {
             "logger2": {
                 "package": "stumpy",
                 "factory": function (Stumpy) { return new Stumpy(); },
                 "arguments": [
                     "Logger2",
                     {
                         showTrace: true,
                         showLogId: true,
                         showLogType: true
                     }
                 ]
             }
         }
     });

Even more examples:

plugin
    .add([
    {
        "name": "logger",
        "group": "util",
        "package": "[email protected]",
        "factory": function (Stumpy) { return new Stumpy(); }
    },
    'lodash.json', // load file data
    './stumpy.js'  // load file data
    ]);