mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
DOCUMENTATION: Better npm run doc, plus minor folder reorganization (#693)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const files = [];
|
||||
const docRoot = "./src/Documentation/ui/doc";
|
||||
const docRoot = "./src/Documentation/doc";
|
||||
const processDir = (dir) => {
|
||||
console.log(dir);
|
||||
for (const file of fs.readdirSync(dir)) {
|
||||
|
||||
21
tools/doc.sh
Normal file
21
tools/doc.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Bundling ingame documentation..."
|
||||
node tools/bundle-doc/index.js
|
||||
|
||||
echo ""
|
||||
echo "Using API Extractor to generate mappings for Netscript API definitions..."
|
||||
npx api-extractor run
|
||||
|
||||
echo ""
|
||||
echo "Creating markdown from Netscript API mappings..."
|
||||
npx api-documenter markdown
|
||||
|
||||
echo ""
|
||||
echo "Running cleanup tasks..."
|
||||
rm input/bitburner.api.json && rm -r input
|
||||
|
||||
# This git add is needed due to documenter using wrong line endings. Console spam discarded.
|
||||
git add markdown/ 2> /dev/null && git add tsdoc-metadata.json 2> /dev/null
|
||||
echo ""
|
||||
echo "Documentation build completed."
|
||||
Reference in New Issue
Block a user