Skip to content

Commit

Permalink
Update tooling & dependencies for Lune 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Jan 14, 2024
1 parent 0acad58 commit c60e92c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions aftman.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tools]
just = "readysetplay/[email protected]"
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"
8 changes: 5 additions & 3 deletions modules/remodel.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
}
Expand Down
4 changes: 2 additions & 2 deletions pages/getting-started/2-introduction/3-standard-io.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>
2 changes: 1 addition & 1 deletion pages/getting-started/2-introduction/4-script-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions pages/getting-started/2-introduction/5-network-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```

---
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pages/getting-started/3-command-line-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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 -
```

---
Expand Down
2 changes: 1 addition & 1 deletion pages/getting-started/4-editor-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pages/roblox/3-remodel-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit c60e92c

Please sign in to comment.