Skip to content
This repository has been archived by the owner on Jun 23, 2019. It is now read-only.

Latest commit

 

History

History
56 lines (38 loc) · 1.39 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.39 KB

Prettier Markdown

Deprecate!Please use own prettier, already supports markdown. 2018-01-10

Codecov npm package NPM downloads

Prettier JavaScript code in markdown.

before / after

compare

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);