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

mandrake

v0.1.8

Published

A markdown web renderer

Downloads

5

Readme

mandrake

Write your markdown documents -> Start a mandrake instance (or embed it in your express app) -> Read the docs!

Install and quick usage

#### As a stand alone server

npm install -g mandrake
mandrake [path-to-folder]

#### With your existing express app

npm install --save mandrake

In your code

var express = require('express');
var mandrake = require('mandrake');

var app = express();

app.set('view engine', 'pug');
app.set('views', './node_modules/mandrake/views');

mandrake({path: __dirname}, function(err, router) {
  app.use(router);
  var http = require('http');

  var server = http.createServer(app);
  server.listen(3000);
});

Manifest

When you use mandrake, either cli or programmatic, it will look into path for a file named mandrake.json. Any value in this json file will be used to override settings for mandrake.

For instance, with the programmatic example above, this file could contain a value for docsPath pointing to a subdirectory of path.

docsPath take precedence over path for indexing documents.

## API

mandrake(options, callback);

Options

type: object Can specify one or more of the following properties:

  • name: Will be used as an header to your docs
  • path: A path were a manifest file is located. Defaults to current working directory.
  • docsPath: Path relative to options.path where documents are located.
  • mountPoint: When the express router will be created, this mount point will be used as root for all generated urls.
  • views and viewEngine: in cli mode these values will be used to setup response.render options. Default to pug renderer and mandrake's built-in default template path.
  • statics: in cli mode, any path in this array will be mounted with a express.static middleware.
  • log: whatever to append log messages with morgan logger. Defaults to true.
  • template: the name of the template to render when a request to any of the urls of the mandrake router is made. Defaults to 'template'

Callback

A callback will be fired once documents are indexed. First argument will be an error, second argument will be an express router that you can use on your app.