1.0.0 • Published 7 years ago

transitionsjs v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

transitions.js

--

Convert Markdown to HTML

Get Started

  1. Install Transitions
npm install --save transitionsjs
  1. Import It ES5
var transitions = require('transitionsjs');

ES6

import transitions from 'transitionsjs';
  1. Use It Pass it a file
transitions(__dirname + '/hello.md');
// returns a HTML string of the converted
// markdown that is in the file

Pass it a string

transitions('Hello, I\'m a *formatted* __string__!');
// returns the HTML string below
<p>Hello, I’m a <em>formatted</em> <strong>string</strong>!</p>

BONUS

What makes it cool? Transitions lets you include <div> tags! How do you do that? Simply place the delimiter ==$$== within your markdown and the content before and after the delimiter will be placed in their own <div>s.

For example: This line

transitions('Alpha==$$==Beta');

returns

<div><p>Alpha</p></div><div><p>Beta</p></div>