Erudite
A tool that parses and executes JavaScript from Markdown, akin to Literate CoffeeScript. Check out the annotated source or the docs below.
Getting Started
npm install -g erudite
CLI Usage
Usage: erudite [options] /path/to/filename
-h, --help show this help text
-o, --outfile write to the given file path
-e, --stage ECMAScript proposal stage (0-4)
--stdout write to stdout (ignores -o)
API Usage
erudite
exports a single function which parses and executes a given buffer of
Markdown text:
var fs = ;var erudite = ; var filename = './literate-javascript.md';var text = fs; ;
You can also parse and execute separately:
var source = erudite;erudite;
erudite.parse(text, opts)
text
A string of Markdown text to processopts
A configuration objecteol
(Optional) The string to use to concatenate code blocks (defaults toos.EOL
)
erudite.exec(src, opts)
src
A string of JavaScript source codeopts
A configuration objectfilename
(Optional) The name of the source file (defaults toerudite
)
License
MIT