Skip to content

Commit

Permalink
Fix last analysis error
Browse files Browse the repository at this point in the history
  • Loading branch information
vocksel committed Nov 24, 2024
1 parent dca1332 commit 486ed85
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .lune/install.luau
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ local fs = require("@lune/fs")
local constants = require("./lib/constants")
local run = require("./lib/run")

local function toPascalCase(text: string)
return text:gsub("(.+)(%.%w+)$", function(name, ext)
return name:gsub("(%a)(%w+)", function(first, rest)
return `{first:upper()}{if rest then rest else ""}`
end):gsub("%-", "") .. ext
end)
local function toPascalCase(filename: string)
local name, ext = filename:match("(.+)(%.%w+)$")

local function upperFirstLetter(first: string, rest: string)
return `{first:upper()}{if rest then rest else ""}`
end

if name and ext then
name = filename:gsub("(%a)(%w+)", upperFirstLetter :: any):gsub("%-", "")

return name .. ext
else
return filename
end
end

local function convertPackageNames()
Expand Down

0 comments on commit 486ed85

Please sign in to comment.