Skip to content

SimplrJS/markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Martynas Žilinskas
Jan 19, 2018
cfbdc74 · Jan 19, 2018

History

63 Commits
Dec 6, 2017
Jan 19, 2018
Jan 19, 2018
Dec 6, 2017
Dec 6, 2017
Dec 21, 2017
Dec 6, 2017
Aug 6, 2017
Dec 6, 2017
Dec 21, 2017
Jan 19, 2018
Dec 6, 2017
Dec 6, 2017

Repository files navigation

NPM version Build Coveralls Dependencies Dev Dependencies

@simplrjs/markdown

Creating markdown made easily.

Get started

$ npm install @simplrjs/markdown --save

Features

  • Creating Markdown output

TODO

  • Markdown file parser

Simple examples

Using MarkdownBuilder.

import * as fs from "fs-extra";
import { MarkdownBuilder } from "@simplrjs/markdown";

const builder = new MarkdownBuilder()
    .UnderlineHeader("Markdown Header", 1)
    .EmptyLine()
    .Text(md => `Hello ${md.Bold("World")}!`)
    .Text("It's so easy to print markdown this way!");

fs.writeFile("./text.md", builder.Build());

You can use MarkdownGenerator directly.

import * as fs from "fs-extra";
import { MarkdownGenerator } from "@simplrjs/markdown";

let output: string[] = [];

output = output.concat(MarkdownGenerator.UnderlineHeader("Markdown Header", 1));
output.push("");
output.push(`Hello ${MarkdownGenerator.Bold("World")}!`);

fs.writeFile("./text.md", output.join("\n"));

API

WIP

License

Released under the MIT license.