Skip to content

Commit 8cfe266

Browse files
committed
doc generator + generated stdlib doc
1 parent fffef53 commit 8cfe266

362 files changed

Lines changed: 271468 additions & 94 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docgen.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Regenerate stdlib reference
2+
3+
# Regenerates the auto-documentation under _doc/stdlib/ref/ from the WurstStdlib2 hotdoc and
4+
# opens a PR with the result. Runs on demand, weekly, or when WurstStdlib2 dispatches an event.
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "0 6 * * 1" # Mondays 06:00 UTC
9+
repository_dispatch:
10+
types: [stdlib-updated]
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
concurrency:
17+
group: stdlib-docgen
18+
cancel-in-progress: true
19+
20+
jobs:
21+
docgen:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout website
25+
uses: actions/checkout@v4
26+
27+
- name: Checkout WurstStdlib2
28+
uses: actions/checkout@v4
29+
with:
30+
repository: wurstscript/WurstStdlib2
31+
ref: master
32+
path: _stdlib
33+
34+
- name: Set up Deno
35+
uses: denoland/setup-deno@v2
36+
with:
37+
deno-version: v2.x
38+
39+
- name: Generate reference
40+
working-directory: tools/docgen
41+
run: deno task gen --src "$GITHUB_WORKSPACE/_stdlib/wurst" --out "$GITHUB_WORKSPACE"
42+
43+
- name: Open pull request
44+
uses: peter-evans/create-pull-request@v6
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
branch: auto/stdlib-docgen
48+
delete-branch: true
49+
base: master
50+
title: "docs(stdlib): regenerate API reference"
51+
commit-message: "docs(stdlib): regenerate API reference"
52+
body: |
53+
Automated regeneration of the stdlib API reference from the latest
54+
[WurstStdlib2](https://github.com/wurstscript/WurstStdlib2) hotdoc.
55+
56+
Generated by `.github/workflows/docgen.yml` (`tools/docgen`).
57+
add-paths: |
58+
_doc/stdlib/ref/**
59+
_data/stdlib_index.json

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
config.codekit
33
_site
4-
.jekyll-metadata
4+
.jekyll-metadata
5+
_stdlib

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ plugins:
1313

1414
exclude:
1515
- vendor
16+
- tools
1617
- assets/plugins/elegant_font/css/index.html
1718
- assets/plugins/jquery-match-height/test.html
1819
- assets/plugins/jquery-scrollTo/demo

_data/stdlib_curated.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Maps a stdlib package name to a hand-written "detailed guide" page on this site.
2+
# The docgen reads this (it never writes it) and adds a prominent "Detailed guide" link to
3+
# the matching auto-generated reference page. Add an entry when you write a longer-form guide.
4+
# PackageName: /stdlib/<path-without-extension>
5+
6+
# Data structures
7+
HashMap: /stdlib/hash_map
8+
HashList: /stdlib/hash_list
9+
LinkedList: /stdlib/linked_list
10+
BitSet: /stdlib/bitset
11+
12+
# Closures
13+
ClosureEvents: /stdlib/closure_events
14+
ClosureForGroups: /stdlib/closure_for_groups
15+
ClosureTimers: /stdlib/closure_timers
16+
Execute: /stdlib/execute
17+
18+
# Dummies
19+
DummyCaster: /stdlib/dummy_caster
20+
DummyRecycler: /stdlib/dummy_recycler
21+
22+
# Math
23+
Angle: /stdlib/angle
24+
Vectors: /stdlib/vectors
25+
26+
# Object editing
27+
AbilityObjEditing: /stdlib/abil_objed
28+
BuffObjEditing: /stdlib/buff_objed
29+
ItemObjEditing: /stdlib/item_objed
30+
UnitObjEditing: /stdlib/unit_objed
31+
UpgradeObjEditing: /stdlib/upg_objed
32+
33+
# Core / util
34+
Assets: /stdlib/assets
35+
ErrorHandling: /stdlib/errorhandling
36+
Wurstunit: /stdlib/wurstunit
37+
DialogBox: /stdlib/dialogbox

0 commit comments

Comments
 (0)