Skip to content
This repository has been archived by the owner on Nov 10, 2018. It is now read-only.

Latest commit

 

History

History
60 lines (40 loc) · 884 Bytes

readme.md

File metadata and controls

60 lines (40 loc) · 884 Bytes

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