diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index e6515f2..2621add 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -5,7 +5,7 @@ pipeline: prepare: image: *cyan commands: - - luarocks install --only-deps awesomewm-d-tl-dev-1.rockspec + - luarocks install --only-deps awesomewmdtl-dev-1.rockspec build: image: *cyan commands: diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 95577f9..0125255 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -26,7 +26,7 @@ pipeline: when: path: - ".woodpecker/**" - - "awesomewm-d-tl-dev-1.rockspec" + - "awesomewmdtl-dev-1.rockspec" - "rockspec/*.rockspec" lint-lua: diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index 229f90c..11eaa9c 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -7,7 +7,7 @@ pipeline: commands: - just local-install-dependencies # TODO : understand why busted can't resolve the dependency in the CI environment - # - luarocks install --only-deps awesomewm-d-tl-dev-1.rockspec + # - luarocks install --only-deps awesomewmdtl-dev-1.rockspec test: image: *busted commands: diff --git a/awesomewm-d-tl-dev-1.rockspec b/awesomewm-d-tl-dev-1.rockspec deleted file mode 100644 index cd656f7..0000000 --- a/awesomewm-d-tl-dev-1.rockspec +++ /dev/null @@ -1,61 +0,0 @@ -rockspec_format = "3.0" -package = "awesomewm-d-tl" -version = "dev-1" -source = { - url = "git+https://gitea.aireone.xyz/Aire-One/awesomewm.d.tl.git", -} -description = { - homepage = "https://gitea.aireone.xyz/Aire-One/awesomewm.d.tl/src/branch/master/README.MD", - license = "GPLv2", -} -dependencies = { - "lualogging 1.6.0", - "inspect 3.1.3", - "ansicolors 1.0.2", - "web_sanitize 1.3.0", - "penlight 1.13.1", - "luasocket 3.1.0-1", - "luasec 1.2.0-1", - "luafilesystem 1.8.0-1", -} -build_dependencies = { - "cyan", -} -build = { - type = "command", - build_command = "cyan build", - install = { - bin = { - "bin/awesomewm-d-tl", - }, - lua = { - ["awesomewm-d-tl.crawler.init"] = "build/awesomewm-d-tl/crawler/init.lua", - ["awesomewm-d-tl.entity.Function_Info"] = "build/awesomewm-d-tl/entity/Function_Info.lua", - ["awesomewm-d-tl.entity.Module_Doc"] = "build/awesomewm-d-tl/entity/Module_Doc.lua", - ["awesomewm-d-tl.entity.Module_Info"] = "build/awesomewm-d-tl/entity/Module_Info.lua", - ["awesomewm-d-tl.entity.Type_Info"] = "build/awesomewm-d-tl/entity/Type_Info.lua", - ["awesomewm-d-tl.entity.Variable_Info"] = "build/awesomewm-d-tl/entity/Variable_Info.lua", - ["awesomewm-d-tl.filesystem.file_writer"] = "build/awesomewm-d-tl/filesystem/file_writer.lua", - ["awesomewm-d-tl.filesystem.init"] = "build/awesomewm-d-tl/filesystem/init.lua", - ["awesomewm-d-tl.logger.init"] = "build/awesomewm-d-tl/logger/init.lua", - ["awesomewm-d-tl.printer.global_env_def"] = "build/awesomewm-d-tl/printer/global_env_def.lua", - ["awesomewm-d-tl.printer.init"] = "build/awesomewm-d-tl/printer/init.lua", - ["awesomewm-d-tl.printer.module_init_definition"] = "build/awesomewm-d-tl/printer/module_init_definition.lua", - ["awesomewm-d-tl.printer.snippets"] = "build/awesomewm-d-tl/printer/snippets.lua", - ["awesomewm-d-tl.printer.teal_type_definition"] = "build/awesomewm-d-tl/printer/teal_type_definition.lua", - ["awesomewm-d-tl.scraper.init"] = "build/awesomewm-d-tl/scraper/init.lua", - ["awesomewm-d-tl.scraper.module_doc"] = "build/awesomewm-d-tl/scraper/module_doc.lua", - ["awesomewm-d-tl.scraper.module_info_list"] = "build/awesomewm-d-tl/scraper/module_info_list.lua", - ["awesomewm-d-tl.scraper.utils"] = "build/awesomewm-d-tl/scraper/utils.lua", - ["awesomewm-d-tl.types.Dag"] = "build/awesomewm-d-tl/types/Dag.lua", - ["awesomewm-d-tl.types.Node"] = "build/awesomewm-d-tl/types/Node.lua", - ["awesomewm-d-tl.visitors.module_dependencies"] = "build/awesomewm-d-tl/visitors/module_dependencies.lua", - ["awesomewm-d-tl.visitors.type_mapping"] = "build/awesomewm-d-tl/visitors/type_mapping.lua", - ["awesomewm-d-tl.ast"] = "build/awesomewm-d-tl/ast.lua", - ["awesomewm-d-tl.dag"] = "build/awesomewm-d-tl/dag.lua", - ["awesomewm-d-tl.init"] = "build/awesomewm-d-tl/init.lua", - ["awesomewm-d-tl.property"] = "build/awesomewm-d-tl/property.lua", - ["awesomewm-d-tl.utils"] = "build/awesomewm-d-tl/utils.lua", - }, - }, -} diff --git a/awesomewmdtl-dev-1.rockspec b/awesomewmdtl-dev-1.rockspec new file mode 100644 index 0000000..8d1a48b --- /dev/null +++ b/awesomewmdtl-dev-1.rockspec @@ -0,0 +1,61 @@ +rockspec_format = "3.0" +package = "awesomewmdtl" +version = "dev-1" +source = { + url = "git+https://gitea.aireone.xyz/Aire-One/awesomewm.d.tl.git", +} +description = { + homepage = "https://gitea.aireone.xyz/Aire-One/awesomewm.d.tl/src/branch/master/README.MD", + license = "GPLv2", +} +dependencies = { + "lualogging 1.6.0", + "inspect 3.1.3", + "ansicolors 1.0.2", + "web_sanitize 1.3.0", + "penlight 1.13.1", + "luasocket 3.1.0-1", + "luasec 1.2.0-1", + "luafilesystem 1.8.0-1", +} +build_dependencies = { + "cyan", +} +build = { + type = "command", + build_command = "cyan build", + install = { + bin = { + "bin/awesomewmdtl", + }, + lua = { + ["awesomewmdtl.crawler.init"] = "build/awesomewmdtl/crawler/init.lua", + ["awesomewmdtl.entity.Function_Info"] = "build/awesomewmdtl/entity/Function_Info.lua", + ["awesomewmdtl.entity.Module_Doc"] = "build/awesomewmdtl/entity/Module_Doc.lua", + ["awesomewmdtl.entity.Module_Info"] = "build/awesomewmdtl/entity/Module_Info.lua", + ["awesomewmdtl.entity.Type_Info"] = "build/awesomewmdtl/entity/Type_Info.lua", + ["awesomewmdtl.entity.Variable_Info"] = "build/awesomewmdtl/entity/Variable_Info.lua", + ["awesomewmdtl.filesystem.file_writer"] = "build/awesomewmdtl/filesystem/file_writer.lua", + ["awesomewmdtl.filesystem.init"] = "build/awesomewmdtl/filesystem/init.lua", + ["awesomewmdtl.logger.init"] = "build/awesomewmdtl/logger/init.lua", + ["awesomewmdtl.printer.global_env_def"] = "build/awesomewmdtl/printer/global_env_def.lua", + ["awesomewmdtl.printer.init"] = "build/awesomewmdtl/printer/init.lua", + ["awesomewmdtl.printer.module_init_definition"] = "build/awesomewmdtl/printer/module_init_definition.lua", + ["awesomewmdtl.printer.snippets"] = "build/awesomewmdtl/printer/snippets.lua", + ["awesomewmdtl.printer.teal_type_definition"] = "build/awesomewmdtl/printer/teal_type_definition.lua", + ["awesomewmdtl.scraper.init"] = "build/awesomewmdtl/scraper/init.lua", + ["awesomewmdtl.scraper.module_doc"] = "build/awesomewmdtl/scraper/module_doc.lua", + ["awesomewmdtl.scraper.module_info_list"] = "build/awesomewmdtl/scraper/module_info_list.lua", + ["awesomewmdtl.scraper.utils"] = "build/awesomewmdtl/scraper/utils.lua", + ["awesomewmdtl.types.Dag"] = "build/awesomewmdtl/types/Dag.lua", + ["awesomewmdtl.types.Node"] = "build/awesomewmdtl/types/Node.lua", + ["awesomewmdtl.visitors.module_dependencies"] = "build/awesomewmdtl/visitors/module_dependencies.lua", + ["awesomewmdtl.visitors.type_mapping"] = "build/awesomewmdtl/visitors/type_mapping.lua", + ["awesomewmdtl.ast"] = "build/awesomewmdtl/ast.lua", + ["awesomewmdtl.dag"] = "build/awesomewmdtl/dag.lua", + ["awesomewmdtl.init"] = "build/awesomewmdtl/init.lua", + ["awesomewmdtl.property"] = "build/awesomewmdtl/property.lua", + ["awesomewmdtl.utils"] = "build/awesomewmdtl/utils.lua", + }, + }, +} diff --git a/bin/awesomewm-d-tl b/bin/awesomewm-d-tl index 65c0b70..4bf0d3e 100755 --- a/bin/awesomewm-d-tl +++ b/bin/awesomewm-d-tl @@ -1,3 +1,3 @@ #!/usr/bin/env lua -local a = require("awesomewm-d-tl") +local a = require("awesomewmdtl") diff --git a/justfile b/justfile index 40b4ee8..80746f5 100644 --- a/justfile +++ b/justfile @@ -4,7 +4,7 @@ lua := "lua" + " -l set_paths" tl := "tl run" + " -l set_paths" rocks_tree := "lua_modules" -rockspec_file := "awesomewm-d-tl-dev-1.rockspec" +rockspec_file := "awesomewmdtl-dev-1.rockspec" lua_targets := `find src/ -type f -iname '*.lua' | xargs` + " " + `ls *.lua | xargs` teal_targets := `find src/ types/ -type f -iname '*.tl' | xargs` @@ -47,7 +47,7 @@ clean: rm -rf build run: - {{ tl }} src/awesomewm-d-tl/init.tl + {{ tl }} src/awesomewmdtl/init.tl validate: cd generated && cyan \ diff --git a/spec/printer/teal_type_definition_spec.tl b/spec/printer/teal_type_definition_spec.tl index 56d7c2c..2714ac2 100644 --- a/spec/printer/teal_type_definition_spec.tl +++ b/spec/printer/teal_type_definition_spec.tl @@ -1,7 +1,7 @@ local assert = require("luassert") -local type Node = require("awesomewm-d-tl.types.Node") +local type Node = require("awesomewmdtl.types.Node") local stringx = require("pl.stringx") -local teal_type_definition_printer = require("awesomewm-d-tl.printer.teal_type_definition") +local teal_type_definition_printer = require("awesomewmdtl.printer.teal_type_definition") local printer = teal_type_definition_printer.printer diff --git a/spec/scraper/module_doc_spec.tl b/spec/scraper/module_doc_spec.tl index 97e5920..23b3546 100644 --- a/spec/scraper/module_doc_spec.tl +++ b/spec/scraper/module_doc_spec.tl @@ -1,6 +1,6 @@ local assert = require("luassert") -local type Node = require("awesomewm-d-tl.types.Node") -local scraper = require("awesomewm-d-tl.scraper.module_doc") +local type Node = require("awesomewmdtl.types.Node") +local scraper = require("awesomewmdtl.scraper.module_doc") local get_doc_from_page = scraper.get_doc_from_page diff --git a/src/awesomewm-d-tl/filesystem/init.tl b/src/awesomewm-d-tl/filesystem/init.tl deleted file mode 100644 index bb44825..0000000 --- a/src/awesomewm-d-tl/filesystem/init.tl +++ /dev/null @@ -1,3 +0,0 @@ -return { - file_writer = require("awesomewm-d-tl.filesystem.file_writer"), -} diff --git a/src/awesomewm-d-tl/printer/init.tl b/src/awesomewm-d-tl/printer/init.tl deleted file mode 100644 index 60e7bd5..0000000 --- a/src/awesomewm-d-tl/printer/init.tl +++ /dev/null @@ -1,6 +0,0 @@ -return { - global_env_def = require("awesomewm-d-tl.printer.global_env_def"), - module_init_definition = require("awesomewm-d-tl.printer.module_init_definition"), - snippets = require("awesomewm-d-tl.printer.snippets"), - teal_type_definition = require("awesomewm-d-tl.printer.teal_type_definition"), -} diff --git a/src/awesomewm-d-tl/scraper/init.tl b/src/awesomewm-d-tl/scraper/init.tl deleted file mode 100644 index c5b0555..0000000 --- a/src/awesomewm-d-tl/scraper/init.tl +++ /dev/null @@ -1,5 +0,0 @@ -return { - module_doc = require("awesomewm-d-tl.scraper.module_doc"), - module_info_list = require("awesomewm-d-tl.scraper.module_info_list"), - utils = require("awesomewm-d-tl.scraper.utils"), -} diff --git a/src/awesomewm-d-tl/ast.tl b/src/awesomewmdtl/ast.tl similarity index 97% rename from src/awesomewm-d-tl/ast.tl rename to src/awesomewmdtl/ast.tl index 9abe5e4..1e488d4 100644 --- a/src/awesomewm-d-tl/ast.tl +++ b/src/awesomewmdtl/ast.tl @@ -1,4 +1,4 @@ -local type Node = require("awesomewm-d-tl.types.Node") +local type Node = require("awesomewmdtl.types.Node") local basic_nodes : { Node.Token : function(name: string, ...: any): Node } = { module = function(name: string, module_path: string): Node diff --git a/src/awesomewm-d-tl/crawler/init.tl b/src/awesomewmdtl/crawler/init.tl similarity index 96% rename from src/awesomewm-d-tl/crawler/init.tl rename to src/awesomewmdtl/crawler/init.tl index c5905a9..dd95e3f 100644 --- a/src/awesomewm-d-tl/crawler/init.tl +++ b/src/awesomewmdtl/crawler/init.tl @@ -1,6 +1,6 @@ local file = require("pl.file") local http = require("socket.http") -local logger = require("awesomewm-d-tl.logger") +local logger = require("awesomewmdtl.logger") local tablex = require("pl.tablex") local log = logger.log("crawler") diff --git a/src/awesomewm-d-tl/dag.tl b/src/awesomewmdtl/dag.tl similarity index 78% rename from src/awesomewm-d-tl/dag.tl rename to src/awesomewmdtl/dag.tl index 3211675..3a86ec3 100644 --- a/src/awesomewm-d-tl/dag.tl +++ b/src/awesomewmdtl/dag.tl @@ -1,6 +1,6 @@ -local type Dag = require("awesomewm-d-tl.types.Dag") -local type Node = require("awesomewm-d-tl.types.Node") -local utils = require("awesomewm-d-tl.utils") +local type Dag = require("awesomewmdtl.types.Dag") +local type Node = require("awesomewmdtl.types.Node") +local utils = require("awesomewmdtl.utils") local function new(): Dag local dag : Dag = { diff --git a/src/awesomewm-d-tl/entity/Function_Info.tl b/src/awesomewmdtl/entity/Function_Info.tl similarity index 93% rename from src/awesomewm-d-tl/entity/Function_Info.tl rename to src/awesomewmdtl/entity/Function_Info.tl index 24029a9..93f9203 100644 --- a/src/awesomewm-d-tl/entity/Function_Info.tl +++ b/src/awesomewmdtl/entity/Function_Info.tl @@ -1,8 +1,8 @@ local List = require("pl.List") local Map = require("pl.Map") -local Type_Info = require("awesomewm-d-tl.entity.Type_Info") -local Variable_Info = require("awesomewm-d-tl.entity.Variable_Info") -local utils = require("awesomewm-d-tl.utils") +local Type_Info = require("awesomewmdtl.entity.Type_Info") +local Variable_Info = require("awesomewmdtl.entity.Variable_Info") +local utils = require("awesomewmdtl.utils") local record Function_Info metamethod __call: function( diff --git a/src/awesomewm-d-tl/entity/Module_Doc.tl b/src/awesomewmdtl/entity/Module_Doc.tl similarity index 96% rename from src/awesomewm-d-tl/entity/Module_Doc.tl rename to src/awesomewmdtl/entity/Module_Doc.tl index 4c627fb..e004e2d 100644 --- a/src/awesomewm-d-tl/entity/Module_Doc.tl +++ b/src/awesomewmdtl/entity/Module_Doc.tl @@ -1,7 +1,7 @@ -local Function_Info = require("awesomewm-d-tl.entity.Function_Info") +local Function_Info = require("awesomewmdtl.entity.Function_Info") local List = require("pl.List") local Map = require("pl.Map") -local Variable_Info = require("awesomewm-d-tl.entity.Variable_Info") +local Variable_Info = require("awesomewmdtl.entity.Variable_Info") local module_to_require : Map = Map({ Shape = "gears.shape", diff --git a/src/awesomewm-d-tl/entity/Module_Info.tl b/src/awesomewmdtl/entity/Module_Info.tl similarity index 100% rename from src/awesomewm-d-tl/entity/Module_Info.tl rename to src/awesomewmdtl/entity/Module_Info.tl diff --git a/src/awesomewm-d-tl/entity/Type_Info.tl b/src/awesomewmdtl/entity/Type_Info.tl similarity index 100% rename from src/awesomewm-d-tl/entity/Type_Info.tl rename to src/awesomewmdtl/entity/Type_Info.tl diff --git a/src/awesomewm-d-tl/entity/Variable_Info.tl b/src/awesomewmdtl/entity/Variable_Info.tl similarity index 92% rename from src/awesomewm-d-tl/entity/Variable_Info.tl rename to src/awesomewmdtl/entity/Variable_Info.tl index 742af51..628be3d 100644 --- a/src/awesomewm-d-tl/entity/Variable_Info.tl +++ b/src/awesomewmdtl/entity/Variable_Info.tl @@ -1,5 +1,5 @@ local List = require("pl.List") -local Type_Info = require("awesomewm-d-tl.entity.Type_Info") +local Type_Info = require("awesomewmdtl.entity.Type_Info") local record Variable_Info metamethod __call: function(self: Variable_Info, name: string | nil, types: List | nil): Variable_Info diff --git a/src/awesomewm-d-tl/filesystem/file_writer.tl b/src/awesomewmdtl/filesystem/file_writer.tl similarity index 96% rename from src/awesomewm-d-tl/filesystem/file_writer.tl rename to src/awesomewmdtl/filesystem/file_writer.tl index b61c865..e07f545 100644 --- a/src/awesomewm-d-tl/filesystem/file_writer.tl +++ b/src/awesomewmdtl/filesystem/file_writer.tl @@ -1,6 +1,6 @@ local file = require("pl.file") local lfs = require("lfs") -local logger = require("awesomewm-d-tl.logger") +local logger = require("awesomewmdtl.logger") local path = require("pl.path") local log = logger.log("file_writer") diff --git a/src/awesomewmdtl/filesystem/init.tl b/src/awesomewmdtl/filesystem/init.tl new file mode 100644 index 0000000..b1b6951 --- /dev/null +++ b/src/awesomewmdtl/filesystem/init.tl @@ -0,0 +1,3 @@ +return { + file_writer = require("awesomewmdtl.filesystem.file_writer"), +} diff --git a/src/awesomewm-d-tl/init.tl b/src/awesomewmdtl/init.tl similarity index 85% rename from src/awesomewm-d-tl/init.tl rename to src/awesomewmdtl/init.tl index 8d08a1d..6459ef8 100644 --- a/src/awesomewm-d-tl/init.tl +++ b/src/awesomewmdtl/init.tl @@ -2,22 +2,22 @@ if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then require("lldebugger").start() end -local ast = require("awesomewm-d-tl.ast") -local crawler = require("awesomewm-d-tl.crawler") -local dag = require("awesomewm-d-tl.dag") -local filesystem = require("awesomewm-d-tl.filesystem") -local printer = require("awesomewm-d-tl.printer") +local ast = require("awesomewmdtl.ast") +local crawler = require("awesomewmdtl.crawler") +local dag = require("awesomewmdtl.dag") +local filesystem = require("awesomewmdtl.filesystem") +local printer = require("awesomewmdtl.printer") local List = require("pl.List") -local logger = require("awesomewm-d-tl.logger") +local logger = require("awesomewmdtl.logger") local Map = require("pl.Map") -local Module_Info = require("awesomewm-d-tl.entity.Module_Info") -local module_dependencies = require("awesomewm-d-tl.visitors.module_dependencies") -local type Node = require("awesomewm-d-tl.types.Node") -local property = require("awesomewm-d-tl.property") -local scraper = require("awesomewm-d-tl.scraper") +local Module_Info = require("awesomewmdtl.entity.Module_Info") +local module_dependencies = require("awesomewmdtl.visitors.module_dependencies") +local type Node = require("awesomewmdtl.types.Node") +local property = require("awesomewmdtl.property") +local scraper = require("awesomewmdtl.scraper") local stringx = require("pl.stringx") -local type_mapping = require("awesomewm-d-tl.visitors.type_mapping") -local utils = require("awesomewm-d-tl.utils") +local type_mapping = require("awesomewmdtl.visitors.type_mapping") +local utils = require("awesomewmdtl.utils") local log = logger.log("main") diff --git a/src/awesomewm-d-tl/logger/init.tl b/src/awesomewmdtl/logger/init.tl similarity index 100% rename from src/awesomewm-d-tl/logger/init.tl rename to src/awesomewmdtl/logger/init.tl diff --git a/src/awesomewm-d-tl/printer/global_env_def.tl b/src/awesomewmdtl/printer/global_env_def.tl similarity index 88% rename from src/awesomewm-d-tl/printer/global_env_def.tl rename to src/awesomewmdtl/printer/global_env_def.tl index 8e54ca8..de98eb8 100644 --- a/src/awesomewm-d-tl/printer/global_env_def.tl +++ b/src/awesomewmdtl/printer/global_env_def.tl @@ -1,8 +1,8 @@ local List = require("pl.List") -local Module_Doc = require("awesomewm-d-tl.entity.Module_Doc") +local Module_Doc = require("awesomewmdtl.entity.Module_Doc") local template = require("pl.template") -local utils = require("awesomewm-d-tl.utils") -local snippets = require("awesomewm-d-tl.printer.snippets") +local utils = require("awesomewmdtl.utils") +local snippets = require("awesomewmdtl.printer.snippets") -- The long therm goal is to have so many `snippets.render_*` functions that -- we can render the whole file with the smallest template possible. diff --git a/src/awesomewmdtl/printer/init.tl b/src/awesomewmdtl/printer/init.tl new file mode 100644 index 0000000..1a8fd07 --- /dev/null +++ b/src/awesomewmdtl/printer/init.tl @@ -0,0 +1,6 @@ +return { + global_env_def = require("awesomewmdtl.printer.global_env_def"), + module_init_definition = require("awesomewmdtl.printer.module_init_definition"), + snippets = require("awesomewmdtl.printer.snippets"), + teal_type_definition = require("awesomewmdtl.printer.teal_type_definition"), +} diff --git a/src/awesomewm-d-tl/printer/module_init_definition.tl b/src/awesomewmdtl/printer/module_init_definition.tl similarity index 84% rename from src/awesomewm-d-tl/printer/module_init_definition.tl rename to src/awesomewmdtl/printer/module_init_definition.tl index 88c324a..db0d1ea 100644 --- a/src/awesomewm-d-tl/printer/module_init_definition.tl +++ b/src/awesomewmdtl/printer/module_init_definition.tl @@ -1,7 +1,7 @@ local Map = require("pl.Map") local template = require("pl.template") -local utils = require("awesomewm-d-tl.utils") -local snippets = require("awesomewm-d-tl.printer.snippets") +local utils = require("awesomewmdtl.utils") +local snippets = require("awesomewmdtl.printer.snippets") -- The long therm goal is to have so many `snippets.render_*` functions that -- we can render the whole file with the smallest template possible. diff --git a/src/awesomewm-d-tl/printer/snippets.tl b/src/awesomewmdtl/printer/snippets.tl similarity index 95% rename from src/awesomewm-d-tl/printer/snippets.tl rename to src/awesomewmdtl/printer/snippets.tl index 6460d0b..e86e232 100644 --- a/src/awesomewm-d-tl/printer/snippets.tl +++ b/src/awesomewmdtl/printer/snippets.tl @@ -1,11 +1,11 @@ -local Function_Info = require("awesomewm-d-tl.entity.Function_Info") +local Function_Info = require("awesomewmdtl.entity.Function_Info") local List = require("pl.List") local Map = require("pl.Map") local stringx = require("pl.stringx") local template = require("pl.template") -local Type_Info = require("awesomewm-d-tl.entity.Type_Info") -local utils = require("awesomewm-d-tl.utils") -local Variable_Info = require("awesomewm-d-tl.entity.Variable_Info") +local Type_Info = require("awesomewmdtl.entity.Type_Info") +local utils = require("awesomewmdtl.utils") +local Variable_Info = require("awesomewmdtl.entity.Variable_Info") local record Module indent: function(str: string, level: number): string diff --git a/src/awesomewm-d-tl/printer/teal_type_definition.tl b/src/awesomewmdtl/printer/teal_type_definition.tl similarity index 96% rename from src/awesomewm-d-tl/printer/teal_type_definition.tl rename to src/awesomewmdtl/printer/teal_type_definition.tl index bb5c4bf..32bfd51 100644 --- a/src/awesomewm-d-tl/printer/teal_type_definition.tl +++ b/src/awesomewmdtl/printer/teal_type_definition.tl @@ -1,8 +1,8 @@ -local ast = require("awesomewm-d-tl.ast") -local logger = require("awesomewm-d-tl.logger") -local type Node = require("awesomewm-d-tl.types.Node") +local ast = require("awesomewmdtl.ast") +local logger = require("awesomewmdtl.logger") +local type Node = require("awesomewmdtl.types.Node") local stringx = require("pl.stringx") -local utils = require("awesomewm-d-tl.utils") +local utils = require("awesomewmdtl.utils") local log = logger.log("scraper") diff --git a/src/awesomewm-d-tl/property.tl b/src/awesomewmdtl/property.tl similarity index 100% rename from src/awesomewm-d-tl/property.tl rename to src/awesomewmdtl/property.tl diff --git a/src/awesomewmdtl/scraper/init.tl b/src/awesomewmdtl/scraper/init.tl new file mode 100644 index 0000000..02d4bd4 --- /dev/null +++ b/src/awesomewmdtl/scraper/init.tl @@ -0,0 +1,5 @@ +return { + module_doc = require("awesomewmdtl.scraper.module_doc"), + module_info_list = require("awesomewmdtl.scraper.module_info_list"), + utils = require("awesomewmdtl.scraper.utils"), +} diff --git a/src/awesomewm-d-tl/scraper/module_doc.tl b/src/awesomewmdtl/scraper/module_doc.tl similarity index 97% rename from src/awesomewm-d-tl/scraper/module_doc.tl rename to src/awesomewmdtl/scraper/module_doc.tl index d48e217..155376f 100644 --- a/src/awesomewm-d-tl/scraper/module_doc.tl +++ b/src/awesomewmdtl/scraper/module_doc.tl @@ -1,10 +1,10 @@ -local ast = require("awesomewm-d-tl.ast") -local type Node = require("awesomewm-d-tl.types.Node") -local logger = require("awesomewm-d-tl.logger") +local ast = require("awesomewmdtl.ast") +local type Node = require("awesomewmdtl.types.Node") +local logger = require("awesomewmdtl.logger") local scan = require("web_sanitize.query.scan_html") -local scraper_utils = require("awesomewm-d-tl.scraper.utils") +local scraper_utils = require("awesomewmdtl.scraper.utils") local stringx = require("pl.stringx") -local utils = require("awesomewm-d-tl.utils") +local utils = require("awesomewmdtl.utils") local log = logger.log("scraper") diff --git a/src/awesomewm-d-tl/scraper/module_info_list.tl b/src/awesomewmdtl/scraper/module_info_list.tl similarity index 77% rename from src/awesomewm-d-tl/scraper/module_info_list.tl rename to src/awesomewmdtl/scraper/module_info_list.tl index 4137ec3..142f934 100644 --- a/src/awesomewm-d-tl/scraper/module_info_list.tl +++ b/src/awesomewmdtl/scraper/module_info_list.tl @@ -1,7 +1,7 @@ -local Module_Info = require("awesomewm-d-tl.entity.Module_Info") +local Module_Info = require("awesomewmdtl.entity.Module_Info") local scan = require("web_sanitize.query.scan_html") -local scraper_utils = require("awesomewm-d-tl.scraper.utils") -local utils = require("awesomewm-d-tl.utils") +local scraper_utils = require("awesomewmdtl.scraper.utils") +local utils = require("awesomewmdtl.utils") local module = {} diff --git a/src/awesomewm-d-tl/scraper/utils.tl b/src/awesomewmdtl/scraper/utils.tl similarity index 98% rename from src/awesomewm-d-tl/scraper/utils.tl rename to src/awesomewmdtl/scraper/utils.tl index 858246c..5f5983f 100644 --- a/src/awesomewm-d-tl/scraper/utils.tl +++ b/src/awesomewmdtl/scraper/utils.tl @@ -1,5 +1,5 @@ local List = require("pl.List") -local logger = require("awesomewm-d-tl.logger") +local logger = require("awesomewmdtl.logger") local Map = require("pl.Map") local scan = require("web_sanitize.query.scan_html") local scanner = require("web_sanitize.query.scan_html") diff --git a/src/awesomewm-d-tl/types/Dag.tl b/src/awesomewmdtl/types/Dag.tl similarity index 76% rename from src/awesomewm-d-tl/types/Dag.tl rename to src/awesomewmdtl/types/Dag.tl index 3ae193a..b8719cc 100644 --- a/src/awesomewm-d-tl/types/Dag.tl +++ b/src/awesomewmdtl/types/Dag.tl @@ -1,4 +1,4 @@ -local type Node = require("awesomewm-d-tl.types.Node") +local type Node = require("awesomewmdtl.types.Node") local record Dag modules: { string : Node } -- module_path (AKA "full name" `package.module.name`) -> root_node (token = "module") diff --git a/src/awesomewm-d-tl/types/Node.tl b/src/awesomewmdtl/types/Node.tl similarity index 100% rename from src/awesomewm-d-tl/types/Node.tl rename to src/awesomewmdtl/types/Node.tl diff --git a/src/awesomewm-d-tl/utils.tl b/src/awesomewmdtl/utils.tl similarity index 97% rename from src/awesomewm-d-tl/utils.tl rename to src/awesomewmdtl/utils.tl index 4387fd7..1c57b26 100644 --- a/src/awesomewm-d-tl/utils.tl +++ b/src/awesomewmdtl/utils.tl @@ -63,7 +63,7 @@ end -- At some point, we should probably write a wrapper to make penlight's function work with pcalls. function utils.do_or_fail(func: function(...: any): (T | nil, string), ...: any): T - local logger = require("awesomewm-d-tl.logger") + local logger = require("awesomewmdtl.logger") local log = logger.log("utils") local ok, res, err = pcall(func, ...) diff --git a/src/awesomewm-d-tl/visitors/module_dependencies.tl b/src/awesomewmdtl/visitors/module_dependencies.tl similarity index 91% rename from src/awesomewm-d-tl/visitors/module_dependencies.tl rename to src/awesomewmdtl/visitors/module_dependencies.tl index c8cd170..24365ef 100644 --- a/src/awesomewm-d-tl/visitors/module_dependencies.tl +++ b/src/awesomewmdtl/visitors/module_dependencies.tl @@ -1,6 +1,6 @@ -local type Dag = require("awesomewm-d-tl.types.Dag") -local type Node = require("awesomewm-d-tl.types.Node") -local utils = require("awesomewm-d-tl.utils") +local type Dag = require("awesomewmdtl.types.Dag") +local type Node = require("awesomewmdtl.types.Node") +local utils = require("awesomewmdtl.utils") local spread = utils.spread diff --git a/src/awesomewm-d-tl/visitors/type_mapping.tl b/src/awesomewmdtl/visitors/type_mapping.tl similarity index 96% rename from src/awesomewm-d-tl/visitors/type_mapping.tl rename to src/awesomewmdtl/visitors/type_mapping.tl index c901c94..877a054 100644 --- a/src/awesomewm-d-tl/visitors/type_mapping.tl +++ b/src/awesomewmdtl/visitors/type_mapping.tl @@ -1,4 +1,4 @@ -local type Node = require("awesomewm-d-tl.types.Node") +local type Node = require("awesomewmdtl.types.Node") -- Special types I don't want to deal with for now local gears_shape_function = "function(cr: any, width: integer, height: integer)"