mirror of
https://github.com/sindresorhus/github-markdown-css.git
synced 2024-03-22 13:10:53 +08:00
34 lines
518 B
JavaScript
Executable File
34 lines
518 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
'use strict';
|
|
var pkg = require('./package.json');
|
|
var githubMarkdownCss = require('./');
|
|
var argv = process.argv.slice(2);
|
|
|
|
function help() {
|
|
console.log([
|
|
'',
|
|
' ' + pkg.description,
|
|
'',
|
|
' Usage',
|
|
' github-markdown-css > <filename>'
|
|
].join('\n'));
|
|
}
|
|
|
|
if (argv.indexOf('--help') !== -1) {
|
|
help();
|
|
return;
|
|
}
|
|
|
|
if (argv.indexOf('--version') !== -1) {
|
|
console.log(pkg.version);
|
|
return;
|
|
}
|
|
|
|
githubMarkdownCss(function (err, css) {
|
|
if (err) {
|
|
throw err;
|
|
}
|
|
|
|
console.log(css);
|
|
});
|