parcel-transformer-markdoc

1.0.0 • Public • Published

A Parcel 2 transformer for Markdoc.

Installation

Start by installing the package:

npm install parcel-transformer-markdoc --save-dev

Then, in the .parcelrc file, add the transformer like this:

{
  "extends": ["@parcel/config-default"],
  "transformers": {
    "*.md": ["parcel-transformer-markdoc"]
  }
}

Example use

When using React.js with Parcel:

import text from "./hello.md";
import Markdoc from "@markdoc/markdoc";
import React from "react";

export function App() {
  const content = Markdoc.renderers.react(text, React);
  return <main>{content}</main>;
}

License

MIT License

Package Sidebar

Install

npm i parcel-transformer-markdoc

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.06 kB

Total Files

4

Last publish

Collaborators

  • charliegerard