commit c1446b0974357a77462fd493af54833f5dea0094 Author: DarkWiiPlayer Date: Tue Aug 13 09:47:32 2024 +0200 Set up initial project diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da95177 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/lua_modules +/.luarocks diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..6f482fe --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,3 @@ +exclude_files = { + "lua_modules"; +} diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..1af2bc1 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,8 @@ +{ + "diagnostics.globals": [ + "lfs" + ], + "workspace.library": [ + "${3rd}/lfs/library" + ] +} \ No newline at end of file diff --git a/chains-dev-1.rockspec b/chains-dev-1.rockspec new file mode 100644 index 0000000..82b1d43 --- /dev/null +++ b/chains-dev-1.rockspec @@ -0,0 +1,18 @@ +package = "chains" +version = "dev-1" +source = { + url = "*** please add URL for source tarball, zip or repository here ***" +} +description = { + homepage = "*** please enter a project homepage ***", + license = "*** please specify a license ***" +} +dependencies = { + "luafilesystem", +} +build = { + type = "builtin", + modules = { + chains = "src/chains.lua" + } +} diff --git a/spec/chains_spec.moon b/spec/chains_spec.moon new file mode 100644 index 0000000..36ce117 --- /dev/null +++ b/spec/chains_spec.moon @@ -0,0 +1,5 @@ +chains = require "chains" + +describe "Chains loader", -> + it "returns a function", -> + assert.is.function chains.new{} diff --git a/spec/files/test.foo.bar.lua b/spec/files/test.foo.bar.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/chains.lua b/src/chains.lua new file mode 100644 index 0000000..1a74420 --- /dev/null +++ b/src/chains.lua @@ -0,0 +1,11 @@ +local chains = {} + +local lfs = require "lfs" + +function chains.new(loaders) + return function(path) + error "Not yet implemented" + end +end + +return chains