4.0.1 • Published 4 years ago

jsx-md v4.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

jsx-md

npm version downloads open issues build status codecov dependency status devDependency status

Generate markdown files with a React-like syntax.

Usage

// We need to tell the JSX transpiler that in this file,
// instead of React we use the custom createElement and Fragment
// functions from jsx-md
/* @jsx MD */
/* @jsxFrag Fragment */
import MD, { Component, Fragment, Heading, LineBreak, render, Text } from "jsx-md";
import { writeFileSync } from "fs";
import pkg from "./package.json";

const Readme: Component = () => (
  <>
    <Heading level={1}>{pkg.name}</Heading>
    <Text>{pkg.description}</Text>
    <LineBreak />
  </>
);

async function writeReadme() {
  writeFileSync("README.md", await render(<Readme />));
}

void writeReadme();

Documentation

There's a documentation of all elements you can use.

3.0.0

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

2.0.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago