diff --git a/.gitbook.yaml b/.gitbook.yaml new file mode 100644 index 0000000..3bb6822 --- /dev/null +++ b/.gitbook.yaml @@ -0,0 +1,5 @@ +root: ./docs + +structure: + readme: ../README.md + summary: ./SUMMARY.md diff --git a/.github/workflows/wiki.yaml b/.github/workflows/wiki.yaml deleted file mode 100644 index bad063c..0000000 --- a/.github/workflows/wiki.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Deploy GitHub Wiki - -on: - push: - branches: - - main - -permissions: - contents: write - -jobs: - wiki: - name: Deploy GitHub Wiki - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Build CLI - shell: bash - run: cargo build --package lune-cli - - - name: Copy docs pages - shell: bash - run: cp -R docs/pages/ wiki - - - name: Generate wiki using CLI - shell: bash - run: cargo run --package lune-cli -- --generate-wiki-dir - - - name: Push wiki changes - uses: Andrew-Chen-Wang/github-wiki-action@v3 - env: - WIKI_DIR: wiki/ - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_MAIL: ${{ secrets.WIKI_GITHUB_EMAIL }} - GH_NAME: ${{ github.repository_owner }} diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..358d1ef --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,25 @@ +# Summary + +## Home + +- [Intro](pages/home/Intro.md) +- [Installation](pages/home/Installation.md) +- [Writing Scripts](pages/home/WritingScripts.md) +- [Running Scripts](pages/home/RunningScripts.md) +- [Editor Setup](pages/home/EditorSetup.md) + +## Roblox + +- [Intro](pages/roblox/Introduction.md) +- [Examples](pages/roblox/Examples.md) +- [API Status](pages/roblox/ApiStatus.md) + +## API Reference + +- [fs](pages/api/fs.md) +- [net](pages/api/net.md) +- [process](pages/api/process.md) +- [roblox](pages/api/roblox.md) +- [serde](pages/api/serde.md) +- [stdio](pages/api/stdio.md) +- [task](pages/api/task.md) diff --git a/docs/pages/Home.md b/docs/pages/Home.md deleted file mode 100644 index 1f12225..0000000 --- a/docs/pages/Home.md +++ /dev/null @@ -1,9 +0,0 @@ -# 🏠 Home - -Welcome to the Lune wiki! - -Here you can find tutorials as well as a full API reference for all of Lune's built-in APIs. - -If you are just getting started, head over to the [installation](https://github.com/filiptibell/lune/wiki/Getting-Started---1-Installation) page! - -Anything else can be found in the navigation sidebar. diff --git a/docs/pages/_Sidebar.md b/docs/pages/_Sidebar.md deleted file mode 100644 index d93f42a..0000000 --- a/docs/pages/_Sidebar.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Home - -- [Getting Started](https://github.com/filiptibell/lune/wiki) - - [1. Installation](https://github.com/filiptibell/lune/wiki/Getting-Started---1-Installation) - - [2. Writing Scripts](https://github.com/filiptibell/lune/wiki/Getting-Started---2-Writing-Scripts) - - [3. Running Scripts](https://github.com/filiptibell/lune/wiki/Getting-Started---3-Running-Scripts) - - [4. Editor Setup](https://github.com/filiptibell/lune/wiki/Getting-Started---4-Editor-Setup) - -# Roblox - -- [Getting Started](https://github.com/filiptibell/lune/wiki/Roblox) -- [API Reference](https://github.com/filiptibell/lune/wiki/Roblox---API-Reference) - -# API Reference - -- [FS](https://github.com/filiptibell/lune/wiki/API-Reference---FS) -- [Net](https://github.com/filiptibell/lune/wiki/API-Reference---Net) -- [Process](https://github.com/filiptibell/lune/wiki/API-Reference---Process) -- [Stdio](https://github.com/filiptibell/lune/wiki/API-Reference---Stdio) -- [Task](https://github.com/filiptibell/lune/wiki/API-Reference---Task) -- [Uncategorized](https://github.com/filiptibell/lune/wiki/API-Reference---Uncategorized) diff --git a/docs/pages/Getting Started - 4 Editor Setup.md b/docs/pages/home/EditorSetup.md similarity index 100% rename from docs/pages/Getting Started - 4 Editor Setup.md rename to docs/pages/home/EditorSetup.md diff --git a/docs/pages/Getting Started - 1 Installation.md b/docs/pages/home/Installation.md similarity index 100% rename from docs/pages/Getting Started - 1 Installation.md rename to docs/pages/home/Installation.md diff --git a/docs/pages/home/Intro.md b/docs/pages/home/Intro.md new file mode 100644 index 0000000..84d80c8 --- /dev/null +++ b/docs/pages/home/Intro.md @@ -0,0 +1,7 @@ +# 🏠 Home + +Welcome to the Lune docs site! + +Here you can find tutorials as well as a full API reference for all of Lune's built-in APIs. + +To get started, head over to the [Installation](https://github.com/filiptibell/lune/wiki/Getting-Started---1-Installation) page. diff --git a/docs/pages/Getting Started - 3 Running Scripts.md b/docs/pages/home/RunningScripts.md similarity index 100% rename from docs/pages/Getting Started - 3 Running Scripts.md rename to docs/pages/home/RunningScripts.md diff --git a/docs/pages/Getting Started - 2 Writing Scripts.md b/docs/pages/home/WritingScripts.md similarity index 100% rename from docs/pages/Getting Started - 2 Writing Scripts.md rename to docs/pages/home/WritingScripts.md diff --git a/docs/pages/Roblox - API Reference.md b/docs/pages/roblox/ApiStatus.md similarity index 82% rename from docs/pages/Roblox - API Reference.md rename to docs/pages/roblox/ApiStatus.md index 641fc32..5d90500 100644 --- a/docs/pages/Roblox - API Reference.md +++ b/docs/pages/roblox/ApiStatus.md @@ -1,48 +1,12 @@ + -# API Reference +# API Status -Welcome to the API reference page for the built-in `roblox` library! +This is a page indicating the current implementation status for instance methods and datatypes in the `roblox` library. -All of the following static functions, classes, and datatypes can be imported using `require("@lune/roblox")`. - -## Static Functions - -### `readPlaceFile` - -Reads a place file into a DataModel instance. - -```lua -local roblox = require("@lune/roblox") -local game = roblox.readPlaceFile("filePath.rbxl") -``` - -### `readModelFile` - -Reads a model file into a table of instances. - -```lua -local roblox = require("@lune/roblox") -local instances = roblox.readModelFile("filePath.rbxm") -``` - -### `writePlaceFile` - -Writes a DataModel instance to a place file. - -```lua -local roblox = require("@lune/roblox") -roblox.writePlaceFile("filePath.rbxl", game) -``` - -### `writeModelFile` - -Writes one or more instances to a model file. - -```lua -local roblox = require("@lune/roblox") -roblox.writeModelFile("filePath.rbxm", { instance1, instance2, ... }) -``` +If an API on a class is not listed here it may not be within the scope for Lune and may not be implemented in the future.
+However, if a recently added datatype is missing, and it can be used as an instance property, it is likely that it will be implemented. ## Classes @@ -109,4 +73,4 @@ Currently implemented datatypes: - [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3) - [`Vector3int16`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3int16) -Note that these datatypes are kept as up-to-date as possible, but some very new members may be missing. +Note that these datatypes are kept as up-to-date as possible, but recently added members & methods may be missing. diff --git a/docs/pages/Roblox.md b/docs/pages/roblox/Examples.md similarity index 77% rename from docs/pages/Roblox.md rename to docs/pages/roblox/Examples.md index 6585d2f..822f4be 100644 --- a/docs/pages/Roblox.md +++ b/docs/pages/roblox/Examples.md @@ -1,15 +1,11 @@ -# ✏️ Writing Lune Scripts for Roblox +# Example Lune Scripts for Roblox -Lune has a powerful built-in library and set of APIs for manipulating Roblox place files and model files. It contains APIs for reading & writing files, and gives you instances to use, just as if you were scripting inside of the Roblox engine, albeit with a more limited API. +These are a few examples of things you can do using the built-in `roblox` library. -For a full list of the currently implemented APIs, check out the [API Reference](https://github.com/filiptibell/lune/wiki/Roblox---API-Reference) page. - -## Example Scripts - -### `1` - Make all parts anchored in a place file +## `1` - Make all parts anchored in a place file ```lua local roblox = require("@lune/roblox") @@ -32,7 +28,7 @@ roblox.writePlaceFile("myPlaceFile.rbxl") --- -### `2` - Save instances in a place as individual model files +## `2` - Save instances in a place as individual model files ```lua local roblox = require("@lune/roblox") @@ -54,7 +50,7 @@ end --- -### `3` - Make a new place from scratch +## `3` - Make a new place from scratch ```lua local roblox = require("@lune/roblox") diff --git a/docs/pages/roblox/Intro.md b/docs/pages/roblox/Intro.md new file mode 100644 index 0000000..67e2b6b --- /dev/null +++ b/docs/pages/roblox/Intro.md @@ -0,0 +1,10 @@ + + + +# ✏️ Writing Lune Scripts for Roblox + +Lune has a powerful built-in library and set of APIs for manipulating Roblox place files and model files. It contains APIs for reading & writing files, and gives you instances to use, just as if you were scripting inside of the Roblox engine, albeit with a more limited API. + +For examples on how to write Roblox-specific Lune scripts, check out the [Examples](https://github.com/filiptibell/lune/wiki/Roblox---Examples) page. + +For a full list of the currently implemented Roblox APIs, check out the [API Reference](https://github.com/filiptibell/lune/wiki/Roblox---API-Reference) page.