fix(codegen): exclude lune types in bundling

This commit is contained in:
Erica Marigold 2023-09-26 20:14:21 +05:30
parent 7dc0020fa5
commit 4218024182
No known key found for this signature in database
GPG key ID: 7843994FD1386E35
2 changed files with 2 additions and 48 deletions

View file

@ -42,7 +42,7 @@ export type Options = {
return function(opts: Options): string
local generator: Generators = opts.generator or "retain_lines"
local encodedExcludes = JSONEncode(opts.excludes)
local excludes = (encodedExcludes == "null" and "[]") or encodedExcludes
local excludes = (encodedExcludes == "null" and '["@lune/**"]') or encodedExcludes
local requireMode = opts.requireMode or "path"
local moduleFolderName = opts.moduleFolderName or "init"
local sources = JSONEncode(opts.sources or { ["@terracotta"] = "./.terracotta" })

View file

@ -1,47 +1 @@
{
"name": "terracotta",
"className": "Folder",
"filePaths": [
"default.project.json"
],
"children": [
{
"name": "darklua",
"className": "Folder",
"children": [
{
"name": "bundler",
"className": "ModuleScript",
"filePaths": [
"darklua/bundler.luau"
]
},
{
"name": "cmd",
"className": "ModuleScript",
"filePaths": [
"darklua/cmd.luau"
]
},
{
"name": "codegen",
"className": "ModuleScript",
"filePaths": [
"darklua/codegen.luau"
]
},
{
"name": "minifier",
"className": "ModuleScript",
"filePaths": [
"darklua/minifier.luau"
]
}
]
},
{
"name": "terracotta",
"className": "Folder"
}
]
}
{"name":"terracotta","className":"Folder","filePaths":["default.project.json"],"children":[{"name":"darklua","className":"Folder","children":[{"name":"bundler","className":"ModuleScript","filePaths":["darklua/bundler.luau"]},{"name":"cmd","className":"ModuleScript","filePaths":["darklua/cmd.luau"]},{"name":"codegen","className":"ModuleScript","filePaths":["darklua/codegen.luau"]},{"name":"minifier","className":"ModuleScript","filePaths":["darklua/minifier.luau"]}]},{"name":"terracotta","className":"Folder"}]}