luarocks stuff
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,3 +15,5 @@ releases/
|
|||||||
*.log*
|
*.log*
|
||||||
memory_scan*
|
memory_scan*
|
||||||
*_report*
|
*_report*
|
||||||
|
*.key
|
||||||
|
*.src.rock
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
local modulePath = (...):match("(.-)[^%.]+$") -- Get the module path prefix (e.g., "libs." or "")
|
local packageName = ... or "FlexLove"
|
||||||
|
local modulePath = packageName:match("(.-)[^%.]+$") -- Get the module path prefix (e.g., "libs." or "")
|
||||||
|
-- If modulePath is empty (e.g., require("FlexLove")), use the package name
|
||||||
|
if modulePath == "" then
|
||||||
|
modulePath = packageName .. "."
|
||||||
|
end
|
||||||
|
|
||||||
local function req(name)
|
local function req(name)
|
||||||
return require(modulePath .. "modules." .. name)
|
return require(modulePath .. "modules." .. name)
|
||||||
end
|
end
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -31,16 +31,30 @@ This library is under rapid, active development. While many features are functio
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
Add the `modules` directory and `FlexLove.lua` into your project. I recommend going to the
|
[Recommended] Go to the [releases](https://github.com/mikefreno/FlexLove/releases) page and download the latest release,
|
||||||
RELEASES page, but you can clone the repo if you want the latest features, but bugs are more
|
there are a few different options for different build profiles, I recommend the "default" build. Then add the `modules` directory and `FlexLove.lua` into your project.
|
||||||
likely.
|
|
||||||
|
Or, if you can also try will luarocks:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
luarocks install flexlove
|
||||||
|
```
|
||||||
|
|
||||||
|
Going this route, you will need to link the luarocks path to your project:
|
||||||
|
(for mac/linux)
|
||||||
|
```lua
|
||||||
|
package.path = package.path .. ";/Users/<your_username>/.luarocks/share/lua/5.1/?.lua"
|
||||||
|
package.path = package.path .. ";/Users/<your_username>/.luarocks/share/lua/5.1/?/init.lua"
|
||||||
|
package.cpath = package.cpath .. ";/Users/<your_username>/.luarocks/lib/lua/5.1/?.so"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local FlexLove = require("FlexLove")
|
local FlexLove = require("FlexLove")
|
||||||
|
|
||||||
-- (Optional) Initialize with a theme and immediate mode
|
-- (Optional) Initialize with a theme and immediate mode
|
||||||
FlexLove.init({
|
FlexLove.init({
|
||||||
theme = "space"
|
theme = "space",
|
||||||
immediateMode = true
|
immediateMode = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
10
RELEASE.md
10
RELEASE.md
@@ -172,10 +172,12 @@ Each profile package includes:
|
|||||||
|
|
||||||
| Profile | Modules | Approximate Size |
|
| Profile | Modules | Approximate Size |
|
||||||
|---------|---------|------------------|
|
|---------|---------|------------------|
|
||||||
| **Minimal** | 16 core modules | ~60% of full |
|
| **Minimal** | 19 core modules | ~70% of full |
|
||||||
| **Slim** | 21 modules | ~80% of full |
|
| **Slim** | 24 modules | ~80% of full |
|
||||||
| **Default** | 23 modules + themes | ~95% of full |
|
| **Default** | 27 modules + themes | ~95% of full |
|
||||||
| **Full** | 24 modules + themes | 100% |
|
| **Full** | 29 modules + themes | 100% |
|
||||||
|
|
||||||
|
**Note:** All profiles now include UTF8.lua for Lua 5.1+ compatibility.
|
||||||
|
|
||||||
Users who want examples, documentation source, or development tools should clone the full repository.
|
Users who want examples, documentation source, or development tools should clone the full repository.
|
||||||
|
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
|
|
||||||
-- (Optional) Initialize with a theme and immediate mode
|
-- (Optional) Initialize with a theme and immediate mode
|
||||||
FlexLove.init({
|
FlexLove.init({
|
||||||
theme = "space"
|
theme = "space",
|
||||||
immediateMode = true
|
immediateMode = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ description = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"lua >= 5.1",
|
"lua >= 5.1",
|
||||||
"luautf8 >= 0.1.3"
|
"luautf8 >= 0.1.3",
|
||||||
}
|
}
|
||||||
|
|
||||||
build = {
|
build = {
|
||||||
@@ -67,7 +67,7 @@ build = {
|
|||||||
["FlexLove.modules.types"] = "modules/types.lua",
|
["FlexLove.modules.types"] = "modules/types.lua",
|
||||||
["FlexLove.modules.Units"] = "modules/Units.lua",
|
["FlexLove.modules.Units"] = "modules/Units.lua",
|
||||||
["FlexLove.modules.UTF8"] = "modules/UTF8.lua",
|
["FlexLove.modules.UTF8"] = "modules/UTF8.lua",
|
||||||
["FlexLove.modules.utils"] = "modules/utils.lua"
|
["FlexLove.modules.utils"] = "modules/utils.lua",
|
||||||
},
|
},
|
||||||
copy_directories = {
|
copy_directories = {
|
||||||
"docs",
|
"docs",
|
||||||
|
|||||||
Reference in New Issue
Block a user