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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ebrew

v0.2.3

Published

Create EPUB documents with Markdown and JSON.

Downloads

23

Readme

EBREW

EBREW lets you create EPUB books and documents using Markdown and a simple JSON manifest format. To get started, install ebrew via npm and start a new book:

> npm i -g ebrew

> cd ~/projects
> mkdir lorem-ipsum && cd $_
> ebrew init
...

Follow the prompts to set up a book.json manifest, which stores information about your book. Then, get writing!

> cat >book.md
# Lorem

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.

## Ipsum

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
^D

When you're done (or you just want to see how things are looking), use ebrew to generate your book:

> ebrew
Generated Lorem-Ipsum.epub

You can specify the output filename and the path to your manifest, but EBREW picks sensible defaults so you usually won't have to.

Sections

As your book gets larger, it's nice to be able to split it up into manageable chunks. The contents manifest key lets you put each section in its own .md file and join them together in the final product. For example:

{
  "title": "Lorem Ipsum",
  "contents": [
    "lorem.md",
    "ipsum.md"
  ]
}

Each section starts on a new page.

Images

You can add images to your markdown documents as you normally would.

![Three circles](images/circles.svg)

EBREW automatically copies the images you use into the resultant EPUB document and adjusts image URLs to correctly refer to them.

Reference

The above tutorial should give you a pretty good idea of how to use EBREW; the following sections provide a comprehensive reference of the command line interface, the manifest format, and EBREW's Markdown extensions.

The ebrew command

> ebrew help

ebrew init

Takes no options. Runs an interactive wizard for creating a new book.json manifest.

ebrew [make] [options] [output=title.epub]

Generates an EPUB file from the given manifest.

--input, -i — Path to the book manifest. Pass - for standard input. Default ./book.json.

The manifest format

| key | description | |----:|:------------| | uuid | A universally unique identifier for the book. Required. | | isbn | An ISBN for the book. Optional. | | doi | A DOI for the book. Optional. | | contents | A path or list of paths corresponding to sections in the book. Required. | | cover | The path to the cover image for the book. Optional. | | coverPage | Specify false to omit the generated cover page from the spine of the book. The cover image will still be present as metadata, but will not appear in the book content. Default: true. | | css | A path or list of paths to stylesheets for the book. Default []. | | title | The book's title. Default: "Untitled". | | sortTitle | The book's title. Default: generated from title. | | subtitle | The book's subtitle, usually displayed below or beside the title, separated from it by a colon. Default: "", i.e., no subtitle. | | language | An RFC 3066 language identifier indicating the primary language of the book's content. Default: "en". | | author/authors | A string or list of strings indicating the authors of the book. Default: "" or [], i.e., no authors. | | publisher | The book's publisher. Default: "", i.e., no publisher. | | rights | A statement about rights. Default: "Copyright ©year authors". | | date | The date of publication of the book. Default: today. | | created | The date on which the book was created. Default: same as date. | | copyrighted | The copyright date of the book. Default: same as date. | | toc | Specify false to omit the generated table of contents from the spine of the book. The table of contents will still be present as metadata, but will not appear in the book content. Default: true. | | tocDepth | The maximum nesting level of the generated table of contents. Default: 6, i.e., no limit. |