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

exemd

v0.1.10

Published

Pre-process markdown code blocks with external tools to produce html. Because we want to do everything with markdown right?

Downloads

165

Readme

exemd NPM version

[object Object]

Install globally with npm:

npm i -g exemd

Usage

Usage:
    exemd list
    exemd FILE [ -r | --raw ] [ -g | --force-png ] [ -p | --pdf ]
    exemd -h | --help

Options:
    -g, --force-png     Generate html+png(inline). Default is html+svg(inline).
    -r, --raw           Generate md+png(inline).
    -p, --pdf           Generate md+pdf(external). Output can be used by pandoc to generate pdf docs.
    -h, --help

Commands:
    list                List available plugins

Arguments:
    FILE                markdown file name.

What is it

It is a markdown pre-processor that runs code inside code blocks, by pasting the output back into the original document. Regarding output:

  • The default output is HTML+SVG while option -g forces HTML+PNG.

  • If you need markdown, use -r for Markdown+PNG. If you need Markdown+PDF (compatible with pdf generation in pandoc), use -p.

News

As of March 2015, I am rewriting the documentation of the plugins. Stay tuned for other updates.

Available plugins:

To see the list of currently available plugins and links to the docs, type:

> exemd list

If you are on NPM.js, look here for more examples.

Syntax

Each Markdown code block should begin with the language specifier followed by a bang (!) between brackets {}, e.g., if you have a diagram in the dot language:

```{dot !}

digraph {
        a -> b[label="0.2",weight="0.2"];
        a -> c[label="0.4",weight="0.4"];
        c -> b[label="0.6",weight="0.6"];
        c -> e[label="0.6",weight="0.6"];
        e -> e[label="0.1",weight="0.1"];
        e -> b[label="0.7",weight="0.7"];
    }

```

exemd will invoke the exemd-dot plugin (which should be installed separately). The plugin will parse the block code by invoking the actual dot executable and the parsed svg will be pasted into the final markdown (or html).

Depending on the plugin, you can also pass parameters (just as in org-mode)

```{plugin-name ! plugin parameters string}


```

Plugins

This section is obsolete, wait for the new documentation that should arrive soon.

Look for npm modules prefixed with exemd. I wrote only exemd-dot and exemd-ditaa for diagrams. Feel free to provide plugins for R (like kintr) or other languages.

Each plugin should export a process(block, opts) function, where:

  • block is the string representing the inner part of the block code

  • opts is an object with the following properties:

    • tmpdir an already setup temporary directory where the plugin can mess around but not delete.
    • params the string following the bang (!) in the block declaration
    • target-mode it can be either html, pdf, or raw

The process function should return the markdown text to replace the original block either directly or through a promise.

Author

  • Vittorio Zaccaria

License

Copyright (c) 2015 Vittorio Zaccaria
Released under the license


This file was generated by verb-cli on March 20, 2015.