From c1446b0974357a77462fd493af54833f5dea0094 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 13 Aug 2024 09:47:32 +0200 Subject: [PATCH] Set up initial project --- .gitignore | 2 ++ .luacheckrc | 3 +++ .luarc.json | 8 ++++++++ chains-dev-1.rockspec | 18 ++++++++++++++++++ spec/chains_spec.moon | 5 +++++ spec/files/test.foo.bar.lua | 0 src/chains.lua | 11 +++++++++++ 7 files changed, 47 insertions(+) create mode 100644 .gitignore create mode 100644 .luacheckrc create mode 100644 .luarc.json create mode 100644 chains-dev-1.rockspec create mode 100644 spec/chains_spec.moon create mode 100644 spec/files/test.foo.bar.lua create mode 100644 src/chains.lua 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