0.0.1 • Published 6 months ago
@web-alchemy/markdown-wasm v0.0.1
WebAssembly build of Rust lib pulldown-cmark
for Node.js
Installation
npm install @web-alchemy/markdown-wasm
Usage example:
import { parse } from '@web-alchemy/markdown-wasm';
const markdownSource = `# title
Some text

`;
const html = parse(makdownSource);
console.log(html)
/*
<h1>title</h1>
<p>Some text</p>
<p><img src="image.png" alt="some image alt" /></p>
*/
Development
- Install Node.js
- Install dev dependencies -
npm ci
. - Modify source code in
src
folder and write tests intest
folder. - Create build -
node --run build
.pkg
folder should contains npm package files. - Run tests -
node --run test
.