mirror of
https://github.com/lune-org/docs.git
synced 2024-12-12 04:50:36 +00:00
Update tooling & dependencies for Lune 0.8.0
This commit is contained in:
parent
0acad58f57
commit
c60e92c446
9 changed files with 24 additions and 22 deletions
|
@ -6,13 +6,13 @@ install-dev-tools:
|
|||
|
||||
# Extract documentation from the main repository using moonwave
|
||||
extract-documentation COMMIT="":
|
||||
lune download "{{COMMIT}}"
|
||||
lune extract
|
||||
lune generate
|
||||
lune run download "{{COMMIT}}"
|
||||
lune run extract
|
||||
lune run generate
|
||||
|
||||
# Re-generates documentation from the main repository using moonwave
|
||||
generate-documentation:
|
||||
lune generate
|
||||
lune run generate
|
||||
|
||||
# Builds and generates a static site directory
|
||||
build:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tools]
|
||||
just = "readysetplay/just@1.8.0"
|
||||
luau-lsp = "JohnnyMorganz/luau-lsp@1.22.0"
|
||||
lune = "filiptibell/lune@0.7.4"
|
||||
stylua = "JohnnyMorganz/StyLua@0.18.0"
|
||||
luau-lsp = "JohnnyMorganz/luau-lsp@1.27.0"
|
||||
lune = "filiptibell/lune@0.8.0"
|
||||
stylua = "JohnnyMorganz/StyLua@0.19.1"
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
local fs = require("@lune/fs")
|
||||
local net = require("@lune/net")
|
||||
local serde = require("@lune/serde")
|
||||
local process = require("@lune/process")
|
||||
local roblox = require("@lune/roblox")
|
||||
local serde = require("@lune/serde")
|
||||
|
||||
export type LuneDataModel = roblox.DataModel
|
||||
export type LuneInstance = roblox.Instance
|
||||
|
@ -140,13 +140,15 @@ local function uploadAssetId(assetId: number, contents: string)
|
|||
})
|
||||
|
||||
local csrfToken = csrfResponse.headers["x-csrf-token"]
|
||||
if csrfToken == nil then error('Failed to fetch CSRF token.') end
|
||||
if csrfToken == nil then
|
||||
error("Failed to fetch CSRF token.")
|
||||
end
|
||||
|
||||
-- 3. Upload the asset to Roblox
|
||||
local uploadHeaders = {
|
||||
["User-Agent"] = "Roblox/WinInet",
|
||||
["Content-Type"] = "application/octet-stream",
|
||||
['X-CSRF-Token'] = csrfToken,
|
||||
["X-CSRF-Token"] = csrfToken,
|
||||
Accept = "application/json",
|
||||
Cookie = cookie,
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ print("Hello, " .. name .. "!")
|
|||
Now you can place this script in your current directory, and run it using Lune:
|
||||
|
||||
```sh copy filename="Bash"
|
||||
lune hello
|
||||
lune run hello
|
||||
```
|
||||
|
||||
You can also prompt for more than just text. Let's extend the above script and ask the person
|
||||
|
@ -86,7 +86,7 @@ print("")
|
|||
Just like before, you can place this script in your current directory, and run it using Lune:
|
||||
|
||||
```sh copy filename="Bash"
|
||||
lune guessing-game
|
||||
lune run guessing-game
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Arguments can be passed to Lune scripts directly from the command line when running them:
|
||||
|
||||
```sh copy filename="Bash"
|
||||
lune script-name arg1 arg2 "argument three"
|
||||
lune run script-name arg1 arg2 "argument three"
|
||||
```
|
||||
|
||||
These arguments will then be available in your script using the
|
||||
|
|
|
@ -30,7 +30,7 @@ end
|
|||
Now you can place this script in your current directory, and run it using Lune:
|
||||
|
||||
```sh copy filename="Bash"
|
||||
lune googler
|
||||
lune run googler
|
||||
```
|
||||
|
||||
## Sending JSON Requests
|
||||
|
@ -87,7 +87,7 @@ Running the above script Lune should now send a request to the placeholder API,
|
|||
response was correct, and print it out:
|
||||
|
||||
```sh copy filename="Bash"
|
||||
lune json-api
|
||||
lune run json-api
|
||||
```
|
||||
|
||||
---
|
||||
|
@ -118,7 +118,7 @@ print("Listening on port 8080 🚀")
|
|||
Just like before, you can place this script in your current directory, and run it using Lune:
|
||||
|
||||
```sh copy filename="Bash"
|
||||
lune network-server
|
||||
lune run network-server
|
||||
```
|
||||
|
||||
Now, when you visit [`http://localhost:8080/`](http://localhost:8080/) you should see the response
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
When you've written a script file, for example `script-name.luau`, you can run it as such:
|
||||
|
||||
```sh copy
|
||||
lune script-name
|
||||
lune run script-name
|
||||
```
|
||||
|
||||
This will look for the file `script-name.luau`**_<sup>[1]</sup>_** in a few locations:
|
||||
|
@ -19,7 +19,7 @@ This will look for the file `script-name.luau`**_<sup>[1]</sup>_** in a few loca
|
|||
## Listing Scripts
|
||||
|
||||
```sh copy
|
||||
lune --list
|
||||
lune list
|
||||
```
|
||||
|
||||
Lists all scripts found in `lune` or `.lune` directories, including any top-level description
|
||||
|
@ -29,14 +29,14 @@ lua-style comment arrow (`-->`).
|
|||
## Advanced Usage
|
||||
|
||||
```sh copy
|
||||
lune -
|
||||
lune run -
|
||||
```
|
||||
|
||||
Runs a script passed to Lune using stdin. Useful for running scripts piped to Lune from external
|
||||
sources. Example:
|
||||
|
||||
```sh copy
|
||||
echo "print 'Hello, terminal!'" | lune -
|
||||
echo "print 'Hello, terminal!'" | lune run -
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
@ -22,7 +22,7 @@ Run the following command in your terminal to generate Luau type definitions for
|
|||
version of Lune:
|
||||
|
||||
```sh
|
||||
lune --setup
|
||||
lune setup
|
||||
```
|
||||
|
||||
### Step 2
|
||||
|
|
|
@ -341,7 +341,7 @@ without the luau file extension. Everything should work the same way it did when
|
|||
Remodel, now running in Lune 🚀
|
||||
|
||||
```sh copy
|
||||
lune example
|
||||
lune run example
|
||||
```
|
||||
|
||||
</Steps>
|
||||
|
|
Loading…
Reference in a new issue