1.0.5 • Published 3 years ago

nanomd v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

nanomd

Build Status SemVer License

A tiny browserify transform to require markdown files compiled with nanohtml. Works great with choo™.

Why?

  • Transparently use any markdown with marked in html templates.
  • Pre-compile markdown to avoid bundling and running a markdown parser.
  • Designed for choo / nanohtml.

Install

❯ npm install nanomd

Usage

const html = require('nanohtml');
const hello = require('./hello.md');

const el = html`
  <body>
    <h1>Hello markdown</h1>
    ${hello()}
  </body>
`;

document.body.appendChild(el);

Compile with browserify

From the command line:

browserify -t nanomd -t nanohtml index.js > bundle.js

In your package.json:

"browserify": {
  "transform": [
    "nanomd",
    "nanohtml"
  ]
}

Make sure to run nanomd before the nanohtml transform.

License

MIT

1.0.5

3 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago