Skip to content

Commit

Permalink
feature: update 'generator' file
Browse files Browse the repository at this point in the history
  • Loading branch information
4x8Matrix committed May 6, 2024
1 parent d72cb48 commit fa05ada
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion discord-luau
8 changes: 8 additions & 0 deletions generator/Generator.luau
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ local net = require("@lune/net")

local Generator = {}

function Generator.removeLegacyFiles()
if fs.isDir("pages/Classes") then
fs.removeDir("pages/Classes/")
end

fs.writeDir("pages/Classes")
end

function Generator.writeClassName(className: string)
local classPath = string.split(className, ".")
local fullPath = "pages/Classes/"
Expand Down
2 changes: 2 additions & 0 deletions generator/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ local Moonwave = require("Moonwave")
local Generator = require("Generator")
local Markdown = require("Markdown")

Generator.removeLegacyFiles()

local packageCommentJson = Moonwave.extractCommentsIntoJson()

for _, classDocumentation in packageCommentJson do
Expand Down

0 comments on commit fa05ada

Please sign in to comment.