mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 14:38:39 +00:00
* 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
17 lines
606 B
JavaScript
17 lines
606 B
JavaScript
const fs = require('fs-extra');
|
|
|
|
// generate cli.md
|
|
const cli = require('../../cli');
|
|
const template = fs.readFileSync('../docs/cli.md.template');
|
|
|
|
fs.writeFileSync('../docs/cli.md', [template,
|
|
...cli.options.map(option => `### \`${option.flags}\`
|
|
${option.description}${((option.bool && option.defaultValue !== undefined)
|
|
? ' (default: ' + option.defaultValue + ')' : '')}
|
|
`),
|
|
'### `-h, --help`\nOutput usage information', ''].join('\n'));
|
|
|
|
// copy local built CSS and fonts
|
|
fs.copySync('../dist/katex.min.css', 'static/static/katex.min.css');
|
|
fs.copySync('../dist/fonts', 'static/static/fonts');
|