evilstreak/markdown-js — pull request #113 by eviltrout (2013-09-03 20:26:00+00:00)
Title: Split up markdown-js into multiple files, build system assembles from the for web use.

This is quite a big change, so here's a big explanation:

The project has been broken up from one large file into several smaller files:

**/core.js** defines `Markdown`
**/markdown_helpers.js** includes the often used helpers
**/parser.js** includes the code relevant to parsing a string into JsonML
**/render_tree.js** the code for producing a string from the JsonML.
**/markdown.js** The main file that includes all the others.
**/dialects/gruber.js** The code relevant to the Gruber dialect of markdown
**/dialects/maruku.js** The code relevant to the Maruku dialect

Note: No functionality should have changed besides that necessary to split it up and import the helper functions where necessary. A lot of lines changed, but most of those lines are exactly the same as before. All tests pass.

## Usage

If you are using node, you can simply include the library as before and everything is the same.

If you'd like to use markdown-js in a browser, there is an additional build step that is required via grunt:

$ grunt all

It will run all the tests and produces `dist/markdown.js` and `dist/markdown.min.js`, which you are free to use in a browser to your heart's content. It strips out all the AMD stuff and concatenates it altogether nicely.

## One more thing

You can tell grunt to build a custom markdown-js. For example if you don't want Maruku:

$ grunt custom:-dialects/maruku

If you do this, your build file will not include any of the code from dialects/maruku. Pretty sweet!