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

markdown-viewer

v1.0.1

Published

A simple development-time markdown to HTML renderer

Downloads

31

Readme

Markdown Viewer

Travis CI Codecov npm GitHub

A simple development-time markdown to HTML renderer.

Check that your markdown files (README.md, LICENSE.md, CONTRIBUTING.md) are properly constructed on your local machine, rather than waiting until you push to discover markdown errors.

Table of Contents

Installation

npm install --save-dev markdown-viewer

Features

  • Generate HTML files (.html) from markdown (.md) files
  • Output generated HTML file to a default directory or specify a different output directory
  • Option to open the generated HTML in the browser immediately after generating it

Usage

<project_dir>/node_modules/.bin/markdown-viewer [OPTIONS]

Options

  • --file, -r: markdown file path, relative to project root; defaults to README.md
  • --output-dir, -o: output directory, relative to project root; defaults to .markdown-viewer. Make sure to add .markdown-viewer to your .gitignore and .npmignore files
  • --open, -b: if set, opens the generated HTML in the default browser
  • --help, -h: show help document

Examples

  • $ <project_dir>/node_modules/.bin/markdown-viewer: generate README.html from README.md and output to .markdown-viewer/README.html
  • $ <project_dir>/node_modules/.bin/markdown-viewer --open: generate README.html, output to .markdown-viewer/README.html, and open in browser
  • $ <project_dir>/node_modules/.bin/markdown-viewer --file CONTRIBUTING.md --output-dir docs --open: generate CONTRIBUTING.html, output to docs/CONTRIBUTING.html, and open in browser

Using NPM scripts

You can add the following stanzas to the scripts section of your package.json file:

  • "view-readme": "./node_modules/.bin/markdown-viewer -b",
  • "view-contributing": "./node_modules/.bin/markdown-viewer -f CONTRIBUTING.md -b",
  • "view-license": "./node_modules/.bin/markdown-viewer -f LICENSE.md -b"

Then you can run:

  • npm run view-readme to view the output of README.md
  • npm run view-contributing to view the output of the CONTRIBUTING.md file
  • npm run view-license to view the output of the LICENSE.md file