Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
11 changed files
with
60 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,8 @@ | |
"extends": "stylelint-config-standard", | ||
"rules": { | ||
"indentation": 4, | ||
} | ||
}, | ||
"ignoreFiles": [ | ||
"**/*.min.css" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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'); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
{ | ||
"scripts": { | ||
"prestart": "cp ../docs/cli.md.template ../docs/cli.md && node ../cli.js markdown-help >> ../docs/cli.md", | ||
"start": "docusaurus-start", | ||
"build": "npm run prestart && docusaurus-build", | ||
"publish-gh-pages": "npm run prestart && docusaurus-publish", | ||
"start": "node lib/build.js && docusaurus-start", | ||
"build": "node lib/build.js && docusaurus-build", | ||
"publish-gh-pages": "node lib/build.js && docusaurus-publish", | ||
"write-translations": "docusaurus-write-translations", | ||
"version": "npm run prestart && docusaurus-version", | ||
"version": "node lib/build.js && docusaurus-version", | ||
"rename-version": "docusaurus-rename-version" | ||
}, | ||
"devDependencies": { | ||
"docusaurus": "^1.3.2" | ||
"docusaurus": "^1.3.2", | ||
"fs-extra": "^7.0.0", | ||
"remarkable-embed": "^0.4.1" | ||
}, | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters