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

pj2md

v4.2.1

Published

Generate a README in markdown from a package.json file

Downloads

6

Readme

pj2md

Build status NPM version XO code style

Generate a README in markdown from a package.json file

Installation

Install pj2md globally using npm:

npm install -g pj2md

Usage

CLI usage

$> pj2md --help

Generate a README in markdown from a package.json file

  Usage:
    pj2md [options]

  Options:
    -o, --out=<file>       Output to file instead of stdout
    -f, --force            Overwrite any existing output file
    -l, --logo=<path>      Add the provided file as a logo, using http://rawgit.com/ url's (1)
    -r, --related=<pkg>    Add a package as a related package in readme (can be set multiple times)
    --no-badges            Don't add any badges to readme
    --no-travis            Don't add a Travis build badge (2)
    --no-codestyle         Don't add a code style badge (3)
    --no-module            Don't add module usage information (4)
    --no-api               Don't add API information (4)
    --no-cli               Don't add CLI usage information (5)
    --no-license           Don't add license information to readme
    --pre<section>=<file>  Include the given file before given section in readme (6)
    --post<section>=<file> Include the given file after given section in readme (6)
    -v, --version          Show version number
    -h, --help             Show help

      1) only applicable when package has a 'repository' section
      2) only applicable when there's a '.travis.yml' file in project
      3) only applicable when package depends on XO, semistandard or standard
      4) only applicable when package has a 'main' section
      5) only applicable when package has a 'bin' section
      6) possible sections are: logo, badges, description, install, usage, module, cli, api, license and ref

  Examples:
    pj2md --no-api -f -o README.md               Generate (and overwrite) README.md without API information from current package.json file
    pj2md --logo media/project.svg > README.md   Generate a readme with 'media/project.svg' as logo to stdout, which is then saved as README.md
    pj2md --predescription desc.md -o README.md  Generate README.md which includes the contents of desc.md before the package description

Configuration

All CLI options can be configured in a pj2md section in your package.json. This way you don't have to type the same options in the command prompt all the time.

Configuration example

{
  "pj2md": {
    "logo": "media/package-logo.png",
    "api": false,
    "postdescription": "extended-description.md",
    "preusage": "some-nice-info.md",
    "related": [
      "a-related-package",
      "another-related-pkg"
    ]
  }
}

Note: options passed via CLI takes precedence over the configuration in package.json.

License

MIT © Joakim Carlstein