remark-jsx
Library to render a working JSX component within Markdown. Golly Gee!
Last updated 2 years ago by mrpotatoes .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install remark-jsx 
SYNC missed versions from official npm registry.

React Rocks!

remark-jsx

Embed working React components within markdown. yayayayayayayayayaya!

So this is a small library of utility methods that I use within my storybook addon. This is where the majority of the work to convert the Markdown strings into Hyperscript.

DSLs

It's much easier to understand code if the namespace just tells you what you're doing. Taking some ideas from the Chai DSL I've created one similar. The chaning here is superficial (ie: the .to is not a method).

This is just a large object so you could destructure and you can access methods directly if you prefer not to have to follow the full path. More on that later.

  • convert.markdown.to.react
  • convert.props.to.table
  • convert.mdast.to.hast
  • convert.html.to.ast
  • convert.markdown.to.react
  • convert.props.to.table
  • convert.mdast.to.hast

Notes

Currently needs to be built so that it can be used as a proper package as it is using React and JSX within and needs to be converted to ES5 for proper use. That is incoming.

TODO

  • [ ] Style the <Wrapper /> better
  • [ ] Fix code so that not ALL code is wrapped
  • [x] Build so it can be used as a proper package.
  • [x] Tests
  • [x] Export npm package
  • [x] Add a <Wrapper />

Current Tags

  • 1.2.1                                ...           latest (2 years ago)

4 Versions

  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |