Generate the CSS for
github-markdown-css
First a rendered Markdown with all possible syntax is fetched from GitHub. Then the GitHub.com CSS is fetched and both are run through UnCSS, which extracts only the used styles, and then through a custom cleanup.
const githubMarkdownCss = require('generate-github-markdown-css');
(async () => {
console.log(await githubMarkdownCss());
//=> '.markdown-body { …'
})();
$ npm install --global generate-github-markdown-css
$ github-markdown-css --help
Usage
$ github-markdown-css > <filename>
MIT © Sindre Sorhus