prettier-markdown
v0.1.8
Published
Prettier JavaScript code in markdown.
Downloads
243
Readme
Prettier Markdown
Prettier JavaScript code in markdown.
before / after
Usage
yarn global add prettier-markdown
npm install [-g] prettier-markdown
CLI
Run prettier-markdown through the CLI with this script.
prettier-markdown ./**/*.md
# Short command
pmd ./**/*.md
API
If has callback
argument, otherwise return a Promise object.
prettierMarkdown(markdownFile [,options] [, callback])
const prettierMarkdown = require('prettier-markdown');
prettierMarkdown('./foo.md', function(err, msg) {
console.log(msg);
});
// promise
const promise = prettierMarkdown(
'./foo.md',
{
/* options */
}
);
promise.then(msg => console.log);
Options
TODO