mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
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:
17
cli.js
17
cli.js
@@ -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) {
|
||||
|
Reference in New Issue
Block a user