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 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-yogini

v2.0.1

Published

Simple, prompt-driven scaffolding for continuously evolving boilerplates.

Readme

yogini

npm version

yogini is a prompt-driven scaffolding system. It makes it easy to create and maintain personal boilerplates that evolve over time.

What makes yogini different?

Generators created by yogini are yeoman generators, so they can be published and consumed them like any other yeoman generator. You do not need to understand yeoman to use yogini.

Install

npm install -g yo                 # install yeoman
npm install -g generator-yogini   # install yogini

Quick Start

1. Create your generator

mkdir generator-mygen             # create a directory for your new generator
cd generator-mygen            
yo yogini                         # generate a blank yogini generator
npm link                          # alias your generator to your globally
                                  # installed npm modules so that you can run
                                  # it with yeoman.

2. Use your generator

mkdir mygen1                      # create a directory for your new project
cd mygen1
yo mygen                          # generate a new project

Architecture

Would you like some generator with your generator? I know, it's a bit confusing. There are four levels to be aware of:

  • yo - Ye ol' scaffolding framework. Does all the hard work, like a good yeoman. Kind of a pain to work with as a developer.
  • yogini - Ye fancy yo wrapper that makes it easier to create, evolve, and maintain your generator.
  • generator-mygen - Your personal generator. Name it whatever you want. Typically you'll have a single generator and use its powerful conditional prompts to control which files are copied for the desired project type.
  • mygen1 - A cute little offspring from generator-mygen. A fresh, new project!

Building your generator

An initial yogini generator produces only a blank README, so you have to customize it to generate something useful.

  • Drop files into app/templates. All files from this directory will be copied into your project directory when you run the generator.
  • Edit the Inquirer prompts in app/yogini.json. These will determine which files get copied (via prefixnotes) and what code gets copied (via striate).

Sample yogini.json file:

{
  "prompts": [
    {
      "type": "confirm",
      "name": "js",
      "message": "Does your project use Javascript?",
      "store": true
    },
    {
      "type": "confirm",
      "name": "css",
      "message": "Does your project use css?",
      "store": true
    }
  }
}

The above yogini.json file would prompt you with two questions every time you run your generator and store the answers in js and css variables. These variables drive the main two aspects of scaffolding: file copying and templating.

1. File Copying

You can control which files in /app/templates get copied into your new project by prefixing filenames with expressions that include prompt variables.

.
├── index.html
├── {js}scripts
│   └── main.js
└── {css}styles
    └── main.css

In the above example, the scripts folder will only be copied if js (as declared in yogini.json) is true, and the styles folder will only be copied if css is true.

  • Empty expressions are a great way to include system and hidden files in your templates folder without them having an effect until they are copied:

    • {}package.json
    • {}.gitignore
  • If a folder name only consists of an expression, all files will be copied to the parent folder:

    main.js
    {js}
      ├── 1.js
      ├── 2.js
      └── 3.js

          ⇨

    main.js
    1.js
    2.js
    3.js
  • Expressions can be any Javascript expression that evaluates to boolean:

    {js && gulp}gulpfile.js

See prefixnote for the nitty-gritty.

2. Templating

You can use striate, a superset of ejs, to control which code gets generated within the files. The answers given to the prompts in yogini.json are available as variables within the scope of your template files.

<!DOCTYPE html>
<html>
<head>
  >> if(css) {
  <link rel='Stylesheet' type='text/css' href='styles/main.css'>
  >> }
</head>
<body>
  >> if(js) {
  <script src='scripts/main.js'></script>
  >> }
</body>
</html>

You can see a complete yogini generator with prompts, file prefixes, and templating at generator-yogini-sample.

License

ISC © Raine Revere