mdx-js / mdxfmt

[DEPRECATED] MDX is now supported in prettier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mdxfmt

An experimental code formatter for MDX.

Installation

Using the API:

npm i -D mdxfmt

Using the CLI:

npm i -g mdxfmt

Usage

Using the API:

const mdxfmt = require('mdxfmt')

const MDX = `
import { Box }
from 'grid-styled'

# Hello, world!

<div>
  hi   </div>
`

mdxfmt(MDX)

Using the CLI:

❯ mdxfmt help

    MDX code formatter

    Usage:
      mdxfmt file.md
      mdxfmt file.md > formatted.md

Options

Key Type Description
jsx {} Options object passed to Prettier for formatting JSX
md {} Options object passedt to Remark Stringify for formatting MD

About

[DEPRECATED] MDX is now supported in prettier

License:MIT License


Languages

Language:JavaScript 100.0%