diff --git a/.github/workflows/push-docs.yml b/.github/workflows/push-docs.yml index 23e0fe5..f9fc67e 100644 --- a/.github/workflows/push-docs.yml +++ b/.github/workflows/push-docs.yml @@ -26,22 +26,39 @@ jobs: repository: nanoforge-dev/docs token: ${{ secrets.ACTIONS_KEY }} + - name: Install Node.js v24 + uses: actions/setup-node@v6 + with: + node-version: 24 + package-manager-cache: false + registry-url: https://registry.npmjs.org/ + + - uses: pnpm/action-setup@v4.1.0 + name: Install pnpm + with: + run_install: false + version: 10.22.0 # Couldnt find a way to execute this action in the right directory + - name: setup git run: | git config --global user.name "github-actions[bot]" git config --global user.email "username@users.noreply.github.com" - - name: setup registry code documentation - uses: mattnotmitt/doxygen-action@v1 - with: - doxyfile-path: engine/packages/ecs-lib/docs/Doxyfile + - name: install doxygen + uses: ssciwr/doxygen-install@v1 + + - name: install deps + run: cd engine && pnpm i - name: synchronize docs run: | - cp -r engine/packages/ecs-lib/docs engine/docs/registry/api + cd engine + ./scripts/build_docs.sh + cd .. + rm docs/engine -rf mkdir -p docs/engine cp -r engine/docs/* docs/engine cd docs - git add . - git commit -m "chore(engine): updating docs" - git push origin main + git add . || echo "No changes to add" + git commit -m "chore(engine): updating docs" || echo "No changes to commit" + git push origin main || echo "No changes to push" diff --git a/.gitignore b/.gitignore index b78b0aa..d9d9524 100644 --- a/.gitignore +++ b/.gitignore @@ -227,3 +227,9 @@ dist .turbo/ compile_commands.json +docs_markdown +xml +docs_build +docs/conf.py +docs/*/api/index.md +docs/ecs-lib/api/typescript.md diff --git a/docs/asset-manager/index.rst b/docs/asset-manager/index.rst new file mode 100644 index 0000000..53d2a2f --- /dev/null +++ b/docs/asset-manager/index.rst @@ -0,0 +1,7 @@ +asset-manager +================== + +.. toctree:: + + + api/index.md diff --git a/docs/common/index.rst b/docs/common/index.rst new file mode 100644 index 0000000..92d8a26 --- /dev/null +++ b/docs/common/index.rst @@ -0,0 +1,7 @@ +common +================== + +.. toctree:: + + + api/index.md diff --git a/docs/config/index.rst b/docs/config/index.rst new file mode 100644 index 0000000..69f6026 --- /dev/null +++ b/docs/config/index.rst @@ -0,0 +1,7 @@ +config +================== + +.. toctree:: + + + api/index.md diff --git a/docs/core/index.rst b/docs/core/index.rst new file mode 100644 index 0000000..6c92d53 --- /dev/null +++ b/docs/core/index.rst @@ -0,0 +1,7 @@ +core +================== + +.. toctree:: + + + api/index.md diff --git a/docs/ecs-client/index.rst b/docs/ecs-client/index.rst new file mode 100644 index 0000000..f95c10e --- /dev/null +++ b/docs/ecs-client/index.rst @@ -0,0 +1,7 @@ +ecs-client +================== + +.. toctree:: + + + api/index.md diff --git a/docs/ecs-lib/index.rst b/docs/ecs-lib/index.rst new file mode 100644 index 0000000..12c7339 --- /dev/null +++ b/docs/ecs-lib/index.rst @@ -0,0 +1,8 @@ +ECS Documentation +================= + +.. toctree:: + + + wasm.rst + api/typescript.rst diff --git a/docs/ecs-lib/wasm.rst b/docs/ecs-lib/wasm.rst new file mode 100644 index 0000000..bd9ea6b --- /dev/null +++ b/docs/ecs-lib/wasm.rst @@ -0,0 +1,11 @@ +C++ classes +----------- + +.. doxygenclass:: nfo::Registry + :members: + +.. doxygenclass:: nfo::Entity + :members: + +.. doxygenclass:: nfo::SparseArray + :members: diff --git a/docs/ecs-server/index.rst b/docs/ecs-server/index.rst new file mode 100644 index 0000000..3cabe15 --- /dev/null +++ b/docs/ecs-server/index.rst @@ -0,0 +1,7 @@ +ecs-server +================== + +.. toctree:: + + + api/index.md diff --git a/docs/graphics-2d/index.rst b/docs/graphics-2d/index.rst new file mode 100644 index 0000000..eb39a82 --- /dev/null +++ b/docs/graphics-2d/index.rst @@ -0,0 +1,7 @@ +graphics-2d +================== + +.. toctree:: + + + api/index.md diff --git a/docs/index.rst b/docs/index.rst index 12e4713..50d1b70 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,11 +2,24 @@ Engine ====== .. toctree:: - :maxdepth: 2 - registry documentation.rst how_to_use.rst + registry/index.rst + network/index.rst + asset-manager/index.rst + common/index.rst + config/index.rst + core/index.rst + ecs-client/index.rst + ecs-server/index.rst + ecs-lib/index.rst + graphics-2d/index.rst + input/index.rst + music/index.rst + sound/index.rst + network-client/index.rst + network-server/index.rst In this doc you will find both the how to use and why use this engine as well as its library. To understand how to use this engine please refer to :doc:`/how_to_use` diff --git a/docs/input/index.rst b/docs/input/index.rst new file mode 100644 index 0000000..6393868 --- /dev/null +++ b/docs/input/index.rst @@ -0,0 +1,7 @@ +input +================== + +.. toctree:: + + + api/index.md diff --git a/docs/music/index.rst b/docs/music/index.rst new file mode 100644 index 0000000..3f765c6 --- /dev/null +++ b/docs/music/index.rst @@ -0,0 +1,7 @@ +music +================== + +.. toctree:: + + + api/index.md diff --git a/docs/network-client/index.rst b/docs/network-client/index.rst new file mode 100644 index 0000000..4222088 --- /dev/null +++ b/docs/network-client/index.rst @@ -0,0 +1,7 @@ +network-client +================== + +.. toctree:: + + + api/index.md diff --git a/docs/network-server/index.rst b/docs/network-server/index.rst new file mode 100644 index 0000000..2c4fc79 --- /dev/null +++ b/docs/network-server/index.rst @@ -0,0 +1,7 @@ +network-server +================== + +.. toctree:: + + + api/index.md diff --git a/docs/network/index.rst b/docs/network/index.rst index 23e0d01..f9296a9 100644 --- a/docs/network/index.rst +++ b/docs/network/index.rst @@ -1,6 +1,14 @@ Network Overview ================ +.. toctree:: + + network-client + network-server + packet-framing + network-server-api + network-client-api + This page describes the global design and rationale for the engine's networking libraries: the `network-server` and `network-client` TypeScript packages. These libraries provide a small, pragmatic networking layer used by the example diff --git a/docs/network/network-client.rst b/docs/network/network-client.rst index 29fe8f7..97bf60b 100644 --- a/docs/network/network-client.rst +++ b/docs/network/network-client.rst @@ -17,7 +17,7 @@ Client responsibilities in a game are typically: or sending low-latency updates. Example --------------------------------------------------- +------- It works exactly the same with UDP diff --git a/docs/registry/index.rst b/docs/registry/index.rst index e642ee1..a76160e 100644 --- a/docs/registry/index.rst +++ b/docs/registry/index.rst @@ -2,7 +2,7 @@ Registry ======== .. toctree:: - :maxdepth: 2 + writing_web_assembly.rst diff --git a/docs/sound/index.rst b/docs/sound/index.rst new file mode 100644 index 0000000..c8920d8 --- /dev/null +++ b/docs/sound/index.rst @@ -0,0 +1,7 @@ +sound +================== + +.. toctree:: + + + api/index.md diff --git a/package.json b/package.json index 44a448f..a95cadc 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,8 @@ "prettier": "^3.6.2", "tsup": "^8.5.1", "turbo": "^2.6.1", + "typedoc": "^0.28.16", + "typedoc-plugin-markdown": "^4.9.0", "typescript": "^5.9.3", "vitest": "^4.0.15" }, diff --git a/packages/asset-manager/typedoc.json b/packages/asset-manager/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/asset-manager/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/common/typedoc.json b/packages/common/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/common/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/config/typedoc.json b/packages/config/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/config/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/core/typedoc.json b/packages/core/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/core/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/ecs-client/typedoc.json b/packages/ecs-client/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/ecs-client/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/ecs-lib/docs/index.rst b/packages/ecs-lib/docs/index.rst index 264e899..12c7339 100644 --- a/packages/ecs-lib/docs/index.rst +++ b/packages/ecs-lib/docs/index.rst @@ -2,7 +2,7 @@ ECS Documentation ================= .. toctree:: - :maxdepth: 2 - wasm - typescript + + wasm.rst + api/typescript.rst diff --git a/packages/ecs-lib/typedoc.json b/packages/ecs-lib/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/ecs-lib/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/ecs-server/typedoc.json b/packages/ecs-server/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/ecs-server/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/graphics-2d/typedoc.json b/packages/graphics-2d/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/graphics-2d/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/input/typedoc.json b/packages/input/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/input/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/music/typedoc.json b/packages/music/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/music/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/network-client/typedoc.json b/packages/network-client/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/network-client/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/network-server/typedoc.json b/packages/network-server/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/network-server/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/packages/sound/typedoc.json b/packages/sound/typedoc.json new file mode 100644 index 0000000..7e2ec1a --- /dev/null +++ b/packages/sound/typedoc.json @@ -0,0 +1,5 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "skipErrorChecking": true +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1988bfa..becfd0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,6 +51,12 @@ importers: turbo: specifier: ^2.6.1 version: 2.6.3 + typedoc: + specifier: ^0.28.16 + version: 0.28.16(typescript@5.9.3) + typedoc-plugin-markdown: + specifier: ^4.9.0 + version: 4.9.0(typedoc@0.28.16(typescript@5.9.3)) typescript: specifier: ^5.9.3 version: 5.9.3 @@ -1147,6 +1153,9 @@ packages: resolution: {integrity: sha512-PPYtcLzhSafdylp8NBOxMCYIcLqTUMNiQc7ciBoAIvxNG2egM+P7e2nNPui5+Svyk89Q+Tnbrp139ZRIIBw3IA==} engines: {node: '>=v16'} + '@gerrit0/mini-shiki@3.21.0': + resolution: {integrity: sha512-9PrsT5DjZA+w3lur/aOIx3FlDeHdyCEFlv9U+fmsVyjPZh61G5SYURQ/1ebe2U63KbDmI2V8IhIUegWb8hjOyg==} + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -1401,6 +1410,21 @@ packages: '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + '@shikijs/engine-oniguruma@3.21.0': + resolution: {integrity: sha512-OYknTCct6qiwpQDqDdf3iedRdzj6hFlOPv5hMvI+hkWfCKs5mlJ4TXziBG9nyabLwGulrUjHiCq3xCspSzErYQ==} + + '@shikijs/langs@3.21.0': + resolution: {integrity: sha512-g6mn5m+Y6GBJ4wxmBYqalK9Sp0CFkUqfNzUy2pJglUginz6ZpWbaWjDB4fbQ/8SHzFjYbtU6Ddlp1pc+PPNDVA==} + + '@shikijs/themes@3.21.0': + resolution: {integrity: sha512-BAE4cr9EDiZyYzwIHEk7JTBJ9CzlPuM4PchfcA5ao1dWXb25nv6hYsoDiBq2aZK9E3dlt3WB78uI96UESD+8Mw==} + + '@shikijs/types@3.21.0': + resolution: {integrity: sha512-zGrWOxZ0/+0ovPY7PvBU2gIS9tmhSUUt30jAcNV0Bq0gb2S98gwfjIs1vxlmH5zM7/4YxLamT6ChlqqAJmPPjA==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + '@sindresorhus/merge-streams@4.0.0': resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} @@ -1445,6 +1469,9 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -1454,6 +1481,9 @@ packages: '@types/semver@7.7.1': resolution: {integrity: sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==} + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/validator@13.15.10': resolution: {integrity: sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==} @@ -1828,6 +1858,10 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -2264,6 +2298,9 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + lint-staged@16.2.7: resolution: {integrity: sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow==} engines: {node: '>=20.17'} @@ -2323,6 +2360,9 @@ packages: resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} @@ -2333,6 +2373,13 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + meow@12.1.1: resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} engines: {node: '>=16.10'} @@ -2543,6 +2590,10 @@ packages: resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==} engines: {node: '>=18'} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -2810,6 +2861,19 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + typedoc-plugin-markdown@4.9.0: + resolution: {integrity: sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw==} + engines: {node: '>= 18'} + peerDependencies: + typedoc: 0.28.x + + typedoc@0.28.16: + resolution: {integrity: sha512-x4xW77QC3i5DUFMBp0qjukOTnr/sSg+oEs86nB3LjDslvAmwe/PUGDWbe3GrIqt59oTqoXK5GRK9tAa0sYMiog==} + engines: {node: '>= 18', pnpm: '>= 10'} + hasBin: true + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x + typescript-eslint@8.49.0: resolution: {integrity: sha512-zRSVH1WXD0uXczCXw+nsdjGPUdx4dfrs5VQoHnUWmv1U3oNlAKv4FUNdLDhVUg+gYn+a5hUESqch//Rv5wVhrg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2822,6 +2886,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} @@ -3443,6 +3510,14 @@ snapshots: dependencies: colorette: 2.0.20 + '@gerrit0/mini-shiki@3.21.0': + dependencies: + '@shikijs/engine-oniguruma': 3.21.0 + '@shikijs/langs': 3.21.0 + '@shikijs/themes': 3.21.0 + '@shikijs/types': 3.21.0 + '@shikijs/vscode-textmate': 10.0.2 + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.7': @@ -3672,6 +3747,26 @@ snapshots: '@sec-ant/readable-stream@0.4.1': {} + '@shikijs/engine-oniguruma@3.21.0': + dependencies: + '@shikijs/types': 3.21.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@3.21.0': + dependencies: + '@shikijs/types': 3.21.0 + + '@shikijs/themes@3.21.0': + dependencies: + '@shikijs/types': 3.21.0 + + '@shikijs/types@3.21.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} + '@sindresorhus/merge-streams@4.0.0': {} '@standard-schema/spec@1.0.0': {} @@ -3712,6 +3807,10 @@ snapshots: '@types/estree@1.0.8': {} + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + '@types/json-schema@7.0.15': {} '@types/node@24.10.2': @@ -3720,6 +3819,8 @@ snapshots: '@types/semver@7.7.1': {} + '@types/unist@3.0.3': {} + '@types/validator@13.15.10': {} '@types/ws@8.18.1': @@ -4109,6 +4210,8 @@ snapshots: emoji-regex@8.0.0: {} + entities@4.5.0: {} + env-paths@2.2.1: {} environment@1.1.0: {} @@ -4558,6 +4661,10 @@ snapshots: lines-and-columns@1.2.4: {} + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + lint-staged@16.2.7: dependencies: commander: 14.0.2 @@ -4620,6 +4727,8 @@ snapshots: strip-ansi: 7.1.2 wrap-ansi: 9.0.2 + lunr@2.3.9: {} + magic-string@0.30.21: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4634,6 +4743,17 @@ snapshots: dependencies: semver: 7.7.3 + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + mdurl@2.0.0: {} + meow@12.1.1: {} meow@13.2.0: {} @@ -4807,6 +4927,8 @@ snapshots: dependencies: parse-ms: 4.0.0 + punycode.js@2.3.1: {} + punycode@2.3.1: {} readdirp@4.1.2: {} @@ -5063,6 +5185,19 @@ snapshots: dependencies: prelude-ls: 1.2.1 + typedoc-plugin-markdown@4.9.0(typedoc@0.28.16(typescript@5.9.3)): + dependencies: + typedoc: 0.28.16(typescript@5.9.3) + + typedoc@0.28.16(typescript@5.9.3): + dependencies: + '@gerrit0/mini-shiki': 3.21.0 + lunr: 2.3.9 + markdown-it: 14.1.0 + minimatch: 9.0.5 + typescript: 5.9.3 + yaml: 2.8.2 + typescript-eslint@8.49.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3): dependencies: '@typescript-eslint/eslint-plugin': 8.49.0(@typescript-eslint/parser@8.49.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -5076,6 +5211,8 @@ snapshots: typescript@5.9.3: {} + uc.micro@2.1.0: {} + ufo@1.6.1: {} undici-types@7.16.0: {} diff --git a/scripts/build_docs.sh b/scripts/build_docs.sh new file mode 100755 index 0000000..15272d5 --- /dev/null +++ b/scripts/build_docs.sh @@ -0,0 +1,54 @@ +#! /bin/sh + +if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then + echo "Usage: $0" + echo "Build the documentation using Sphinx." + echo "--build Build the documentation." + exit 0 +fi + +PNPM=$(which pnpm) +SPHINX=$(which sphinx-build) + +if [ -z "$PNPM" ]; then + echo "pnpm is not installed. Please install pnpm to proceed." + exit 1 +fi + +run_typedoc() { + $PNPM typedoc --options typedoc.json +} + +clean_typedoc() { + rm -rf docs_markdown +} + +run_sphinx() { + $SPHINX docs docs_build +} + +setup_api_docs() { + for dir in packages/*; do + mkdir -p docs/$(basename $dir)/api + cp -r docs_markdown/@nanoforge-dev/$(basename $dir).md docs/$(basename $dir)/api/index.md + done +} + +doxygen_doc() { + doxygen packages/ecs-lib/docs/Doxyfile + + cp -r xml docs/ecs-lib/api/xml + cp -r packages/ecs-lib/docs/index.rst docs/ecs-lib/index.rst + cp -r packages/ecs-lib/docs/wasm.rst docs/ecs-lib/wasm.rst + mv docs/ecs-lib/api/index.md docs/ecs-lib/api/typescript.md +} + +clean_typedoc +run_typedoc +setup_api_docs +doxygen_doc + +if [ "$1" = "--build" ]; then + run_sphinx + echo "Documentation built successfully." +fi \ No newline at end of file diff --git a/typedoc.base.json b/typedoc.base.json new file mode 100644 index 0000000..07033b3 --- /dev/null +++ b/typedoc.base.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "readme": "none", + "includeVersion": true +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..a9bde30 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "plugin": ["typedoc-plugin-markdown"], + "entryPoints": ["packages/*"], + "entryPointStrategy": "packages", + "skipErrorChecking": true, + "router": "module", + "includeVersion": false, + "readme": "none", + "entryFileName": "index", + "hidePageHeader": true, + "hideBreadcrumbs": true, + "useCodeBlocks": true, + "cleanOutputDir": true, + "excludePrivate": true, + "outputs": [ + { + "name": "markdown", + "path": "./docs_markdown" + } + ] +}