Set up initial project
This commit is contained in:
commit
c1446b0974
7 changed files with 47 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/lua_modules
|
||||||
|
/.luarocks
|
3
.luacheckrc
Normal file
3
.luacheckrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
exclude_files = {
|
||||||
|
"lua_modules";
|
||||||
|
}
|
8
.luarc.json
Normal file
8
.luarc.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"diagnostics.globals": [
|
||||||
|
"lfs"
|
||||||
|
],
|
||||||
|
"workspace.library": [
|
||||||
|
"${3rd}/lfs/library"
|
||||||
|
]
|
||||||
|
}
|
18
chains-dev-1.rockspec
Normal file
18
chains-dev-1.rockspec
Normal file
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
5
spec/chains_spec.moon
Normal file
5
spec/chains_spec.moon
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
chains = require "chains"
|
||||||
|
|
||||||
|
describe "Chains loader", ->
|
||||||
|
it "returns a function", ->
|
||||||
|
assert.is.function chains.new{}
|
0
spec/files/test.foo.bar.lua
Normal file
0
spec/files/test.foo.bar.lua
Normal file
11
src/chains.lua
Normal file
11
src/chains.lua
Normal file
|
@ -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
|
Loading…
Reference in a new issue