Use local built CSS and fonts for master documentation (#1584)

* Change `npm run` to `yarn`

* Export `commander` program if required as module

* Move `prestart` (cli.md generation) to build.js

* Normalize script names

* Change `yarn prestart` to `node lib/build.js`

* Use local built CSS and fonts

* Move stylesheet after the first paragraph

* Remove prestart script
This commit is contained in:
ylemkimon
2018-08-11 08:20:03 +09:00
committed by GitHub
parent d2f56cebd7
commit b99de9ae68
11 changed files with 60 additions and 37 deletions

17
cli.js
View File

@@ -62,22 +62,13 @@ const program = require("commander")
.option("-i, --input <path>", "Read LaTeX input from the given file.")
.option("-o, --output <path>", "Write html output to the given file.");
program.command('markdown-help')
.description('Print markdown version of the help')
.action(() => {
console.log();
console.log(program.options.map(option => `### \`${option.flags}\`
${option.description}${((option.bool && option.defaultValue !== undefined)
? ' (default: ' + option.defaultValue + ')' : '')}
`)
.concat(['### `-h, --help`\nOutput usage information'])
.join('\n'));
process.exit();
});
if (require.main !== module) {
module.exports = program;
return;
}
const options = program.parse(process.argv);
function readMacros() {
if (options.macroFile) {
fs.readFile(options.macroFile, "utf-8", function(err, data) {