JSPM

@mdx-js/mdx

0.16.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3140171
  • Score
    100M100P100Q212263F
  • License MIT

Parse MDX and transpile to JSX

Package Exports

  • @mdx-js/mdx
  • @mdx-js/mdx/mdx-ast-to-mdx-hast
  • @mdx-js/mdx/mdx-hast-to-jsx
  • @mdx-js/mdx/util

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mdx-js/mdx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@mdx-js/mdx

Build Status lerna Join the community on Spectrum

MDX implementation using remark.

Installation

npm:

npm i -S @mdx-js/mdx

Usage

const mdx = require('@mdx-js/mdx')

const result = await mdx(`
# Hello, MDX

I <3 Markdown and JSX
`)

console.log(result)

Yields:

export default ({components, ...props}) => <MDXTag name="wrapper"  components={components}><MDXTag name="h1" components={components}>{`Hello, MDX`}</MDXTag>
<MDXTag name="p" components={components}>{`I <3 Markdown and JSX`}</MDXTag></MDXTag>

Contribute

See contributing.md in mdx-js/mdx for ways to get started.

This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Compositor and ZEIT