Skip to content

Commit 4d7dfa5

Browse files
committed
Moved library into a subdirectory, renamed to init.lua
This just makes things easier to copy the library into a project or add as a git submodule.
1 parent 3af580d commit 4d7dfa5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ They're written in [LDoc](https://github.com/stevedonovan/LDoc/) in [peachy.lua]
3838
If you want to build the documentation yourself for whatever reason then:
3939

4040
* install [LDoc](https://github.com/stevedonovan/LDoc/)
41-
* Run `ldoc.lua peachy.lua -d docs`
41+
* Run `ldoc.lua lib/init.lua -d docs`
4242

4343
This will build them into the docs directory.
4444

4545
# Limitations
4646
* By default Aseprite will export a **non-relative** path as the image file. This is problematic because LÖVE will refuse to load it and it's non-portable. There's a workaround listed [here](https://github.com/aseprite/aseprite/issues/1606). Either specify the image yourself in `peachy.new`, edit the JSON manually or use the CLI.
4747
* Exported sprite sheets **must** be exported as an array, **not** as a hash table.
4848

49-
![Export as array](docs/img/export_type.png)
49+
![Export as array](docs/img/export_type.png)

peachy.lua peachy/init.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ local peachy = {
3030
]]
3131
}
3232

33-
local PATH = select('1', ...):match(".+%.") or ""
34-
local json = require(PATH.."/lib/json")
35-
local cron = require(PATH.."/lib/cron")
33+
local PATH = (...):gsub("%.[^%.]+$", "")
34+
local json = require(PATH..".lib.json")
35+
local cron = require(PATH..".lib.cron")
3636

3737
peachy.__index = peachy
3838

lib/cron.lua peachy/lib/cron.lua

File renamed without changes.

lib/json.lua peachy/lib/json.lua

File renamed without changes.

0 commit comments

Comments
 (0)