Skip to content

Commit

Permalink
Move .lua -> .luau for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
BusyCityGuy committed Sep 12, 2024
1 parent dc31880 commit caefb51
Show file tree
Hide file tree
Showing 20 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*.rbxlx
*.rbxl.lock
*.rbxlx.lock
globaltypes.d.lua
globaltypes.d.luau
Packages
DevPackages
*sourcemap.json
Expand Down
6 changes: 5 additions & 1 deletion .luau-lsp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"luau-lsp.require.directoryAliases": {
"@lune/": "~/.lune/.typedefs/0.8.8/"
},
"luau-lsp.ignoreGlobs": ["**/_Index/**", "globalTypes.d.lua", "*Packages/**"],
"luau-lsp.ignoreGlobs": [
"**/_Index/**",
"globalTypes.d.luau",
"*Packages/**"
],
"luau-lsp.types.roblox": true
}
2 changes: 1 addition & 1 deletion .vscode/settings.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"luau-lsp.sourcemap.rojoProjectFile": "test.project.json",
"luau-lsp.ignoreGlobs": [
"**/_Index/**",
"**/*.d.lua",
"**/*.d.luau",
"*Packages/**"
],
"cSpell.words": ["aftman", "rbxl", "rojo"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ A simple state machine diagram for a light switch may look like this, where

![Screen Shot 2023-12-14 at 18 04 33](https://github.com/BusyCityGuy/finite-state-machine-luau/assets/55513323/3d5b2118-91ea-4427-ac2d-688fb0094d1f)

```lua
```luau
local LightState = {
On = "On",
Off = "Off",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lune/Context/Debug.lua → lune/Context/Debug.luau
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
On Roblox, it's locked behind a feature flag FFlagDebugLoadModule, which is not enabled by default.
In Lune, it doesn't exist at all, so this module creates the interface for it but is not implemented.
The _loader function needs to be overridden to be usable.
In this project, the `lune/test.lua` script implements and sets the _loader function.
In this project, the `lune/test.luau` script implements and sets the _loader function.
--]]

local Debug
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lune/Utils/Runtime.lua → lune/Utils/Runtime.luau
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

--[[
Provides a connection to a loop that runs every frame. This is used
in the custom Heartbeat implementation in lune/test.lua
in the custom Heartbeat implementation in lune/test.luau
--]]

local task = require("@lune/task")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions lune/test.lua → lune/test.luau
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ local DateTime = require("Context/DateTime")
local Debug = require("Context/Debug")
local Runtime = require("Utils/Runtime")

-- DEPENDENTS: [test.lua, Jest]
-- DEPENDENTS: [test.luau, Jest]
local ReducedInstance = require("Utils/ReducedInstance")

-- DEPENDENTS: [test.lua]
-- DEPENDENTS: [test.luau]
local Path = require("Utils/Path")

type RojoProject = {
Expand Down Expand Up @@ -106,7 +106,7 @@ implementRobloxMethods()
-- Declaring because it's needed by `loadScript`, but `loadScript` is also needed in `requireModule`. Defined later.
local requireModule

-- DEPENDENTS: [TestService/Source/run.server.lua]
-- DEPENDENTS: [TestService/Source/run.server.luau]
-- ProcessService isn't implemented in Lune, so this creates a workable implementation of it by mapping it to process.exit
local gameWithContext = setmetatable({
GetService = function(_self, serviceName: string)
Expand All @@ -122,7 +122,7 @@ local gameWithContext = setmetatable({
end,
}, { __index = game })

-- DEPENDENTS: [test.lua, Jest]
-- DEPENDENTS: [test.luau, Jest]
local function loadScript(script: roblox.Instance): (((...any) -> ...any)?, string?)
script = ReducedInstance.once(script)
if not script:IsA("LuaSourceContainer") then
Expand Down
4 changes: 2 additions & 2 deletions scripts/analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

set -e

TYPES_FILE=globalTypes.d.lua
TYPES_FILE=globalTypes.d.luau
SETTINGS_FILE=.luau-lsp.json

if [ ! -f "$TYPES_FILE" ]; then
echo "Fetching global types..."
curl https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.lua > $TYPES_FILE
curl https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.luau > $TYPES_FILE
echo "Wrote global types to $TYPES_FILE"
fi

Expand Down
File renamed without changes.

0 comments on commit caefb51

Please sign in to comment.