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

@my-ul/build-readme

v1.1.0

Published

Compiles multiple markdowns into one markdown file, attempting to preserve structure.

Downloads

3

Readme

build-readme

The build-readme utility semi-intelligently combines several markdown documents into one document, suitable for publishing to npm. This tool is designed with component-based architecture in mind: with this tool, you can bundle a README.md alongside your code and tests, and then compile it into one giant readme when ready.

It is used to support @my-ul/ng-porcelain.

Features

  • automatic image handling (include gifs and jpegs)
  • automatic re-leveling of heading levels (ex, # nested three sections deep becomes ###)
  • automatic generation of npm install section

Installation

npm install -g @my-ul/build-readme

Usage

Arguments

OPTIONS
  -a, --assets=assets
  		[default: doc-assets] Name of the assets directory; if blank, `doc-assets` is used.
  -c, --configFile=configFile
  		(required) A JSON file that provides the TOC structure.
  -o, --outFile=outFile
  		[default: README.md] Output path, including filename.
  -p, --packageFile=packageFile
  		[default: package.json] The distribution package.json file.  Used for generating the installation command.
  -t, --title=title
  		(required) Root title for the output document
  -x, --excludePackages=excludePackages
  		(required) [default: ^(@angular/.*)$] A regular expression string used to exclude packages from the generated installation command.

Example

Let's create a README.md file using three source documents: INSTALL.md and components/dropdown/README.md and components/checkbox/README.MD.

contoso/
├─ components/
│  ├─ checkbox/
│  │  ├─ README.md
│  ├─ dropdown/
│  │  ├─ README.md
│  ├─ README.md
├─ INSTALL.md
├─ package.json

Organize your output document..

If you want to include an introduction to a section, you can add that introduction by using the __ (two underscores) key in your README.json index.

{
    "Installation": "./INSTALL.md",
    "Components": {
        "__": "./components/README.md",
        "Dropdown": "./components/dropdown/README.md",
        "Checkbox": "./components/checkbox/README.md"
    }
}

Run the generator command...

npx build-readme \
	-t "Contoso Components" \
	-c "readme.json" \
	-o "dist/README.md" \
	-p "package.json"

Once run, this will output a document such as... Heading levels will be adjusted automatically.

# Contoso Components

## Installation

This is the content of `./INSTALL.md`.

## Components

This is the content of `./components/README.md`. It is included as a section introduction using `__` as the tag.

### Dropdown

This is the content of `./components/dropdown/README.md`. Since it is nested, it has a heading level 3.

### Checkbox

This is the content of `./components/checkbox/README.md`. Since it is nested, it has heading level 3.