Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including generator-nm with all npm packages installed. Try it out:

generator-nm lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("generator-nm/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

generator-nm v5.1.1

Scaffold out a node module

generator-nm Build Status

Scaffold out a node module

Optionally with a CLI.

This is what I use for my own modules.

Install

$ npm install --global yo generator-nm

Usage

With yo:

$ yo nm

There are multiple command-line options available:

$ yo nm --help

  Usage:
    yo nm [options]

  Options:
    --help          # Print the generator's options and usage
    --skip-cache    # Do not remember prompt answers                      Default: false
    --skip-install  # Do not automatically install dependencies           Default: false
    --org           # Publish to a GitHub organization account
    --cli           # Add a CLI
    --coverage      # Add code coverage with nyc
    --codecov       # Upload coverage to codecov.io (implies --coverage)

The --org option takes a string value (i.e. --org=avajs). All others are boolean flags and can be negated with the no prefix (i.e. --no-codecov). You will be prompted for any options not passed on the command-line.

Tip

Use chalk if you want colors in your CLI.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free