Compare commits
2 Commits
ed512cce18
...
d629092a1a
Author | SHA1 | Date | |
---|---|---|---|
d629092a1a | |||
b2046ea561 |
|
@ -1,8 +1,29 @@
|
||||||
|
# WARNING!
|
||||||
|
# THIS IS AN AUTOGENERATED FILE!
|
||||||
|
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
|
||||||
|
|
||||||
name: LÖVE/Lua Library
|
name: LÖVE/Lua Library
|
||||||
on: [push]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore: ['README.md', '.gitignore', 'LICENSE', 'CONVENTIONS.md']
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Lua-Testing:
|
||||||
uses: jmaa/workflows/.gitea/workflows/lua-testing.yaml@v6.21
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install Lua
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y luajit
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Run testing library
|
||||||
|
run: luajit test/init.lua
|
||||||
Static-Analysis:
|
Static-Analysis:
|
||||||
uses: jmaa/workflows/.gitea/workflows/lua-static-analysis.yaml@v6.21
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Luacheck linter
|
||||||
|
uses: https://github.com/lunarmodules/luacheck@v1.1.1
|
||||||
|
|
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# WARNING!
|
||||||
|
# THIS IS AN AUTOGENERATED FILE!
|
||||||
|
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
|
||||||
|
|
||||||
|
# Löve: Exclude build items
|
||||||
|
/bin/
|
||||||
|
/lib/
|
||||||
|
.love-cache/
|
||||||
|
|
||||||
|
# Compiled Lua sources
|
||||||
|
luac.out
|
||||||
|
|
||||||
|
# Misc (Image, MacOS, Backups) files
|
||||||
|
*.psd
|
||||||
|
*~
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
*.tiled-session
|
|
@ -1,3 +1,7 @@
|
||||||
|
-- WARNING!
|
||||||
|
-- THIS IS AN AUTOGENERATED FILE!
|
||||||
|
-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
|
||||||
|
|
||||||
std = "love+max"
|
std = "love+max"
|
||||||
cache = true
|
cache = true
|
||||||
include_files = {"**.lua", "*.luacheckrc"}
|
include_files = {"**.lua", "*.luacheckrc"}
|
||||||
|
|
3
LICENSE
Normal file
3
LICENSE
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Copyright (c) 2017-2025 Jon Michael Aanes
|
||||||
|
|
||||||
|
All rights reserved.
|
63
README.md
Normal file
63
README.md
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
<!-- WARNING! -->
|
||||||
|
<!-- THIS IS AN AUTOGENERATED FILE! -->
|
||||||
|
<!-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! -->
|
||||||
|
|
||||||
|
# Suggest-Require
|
||||||
|
|
||||||
|
This is a small library to discover which modules are importable using
|
||||||
|
[require](https://www.lua.org/manual/5.4/manual.html#pdf-require).
|
||||||
|
|
||||||
|
It's useful for seeing which modules your Lua environment
|
||||||
|
can access. It's intended usage is in an auto-complete system for Lua.
|
||||||
|
|
||||||
|
Known to work with Lua 5.1 and LuaJIT, on Linux.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Standalone: The library be called as a script `luajit
|
||||||
|
suggest-require.lua` to print available packages in the Lua
|
||||||
|
environment.
|
||||||
|
|
||||||
|
Library: Import through require. A single function is be returned.
|
||||||
|
Calling this function will return the available packages, as a list
|
||||||
|
of strings.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Replicating the script functionality of this library is as simple as:
|
||||||
|
|
||||||
|
local package_names = require 'suggest-require' ()
|
||||||
|
for , name in ipairs(packagenames) do
|
||||||
|
|
||||||
|
```
|
||||||
|
print('- '..name)
|
||||||
|
```
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
- `1.4.0`: Updated repository (17. April 2025)
|
||||||
|
- `1.3.0`: Usage and example (6. July 2020)
|
||||||
|
- `1.2.0`: Unknown change (9. January 2018)
|
||||||
|
- `1.1.0`: Unknown change (Unknown)
|
||||||
|
- `1.0.0`: Initial version (September 2017)
|
||||||
|
|
||||||
|
- Author: Jon Michael Aanes (jonjmaa@gmail.com)
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
This project requires [PUC Lua 5.1](https://www.tecgraf.puc-rio.br/lua/mirror/versions.html#5.1) or [LuaJIT](https://luajit.org/luajit.html). Newer versions of PUC Lua are not supported.
|
||||||
|
|
||||||
|
This project does not have any library requirements 😎
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Feel free to submit pull requests. Please follow the [Code Conventions](CONVENTIONS.md) when doing so.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
```
|
||||||
|
Copyright (c) 2017-2025 Jon Michael Aanes
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
```
|
8
init.lua
8
init.lua
|
@ -1,4 +1,6 @@
|
||||||
local _VERSION = '0.1.2'
|
-- WARNING!
|
||||||
|
-- THIS IS AN AUTOGENERATED FILE!
|
||||||
|
-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
|
||||||
|
|
||||||
local lib = require ((... and (...) .. '.' or '.') .. 'suggest-require')
|
-- This file automatically redirects to "suggest-require.lua"
|
||||||
return lib
|
return require (((...) ~= 'init' and (...) .. '.' or '') .. 'suggest-require')
|
||||||
|
|
|
@ -1,48 +1,40 @@
|
||||||
|
--- # Suggest-Require
|
||||||
-- ||| Suggest-Require ||| -----------------------------------------------------
|
--
|
||||||
|
|
||||||
-- This is a small library to discover which modules are importable using
|
-- This is a small library to discover which modules are importable using
|
||||||
-- `require`. It's useful for seeing which modules your Lua environment
|
-- `require`. It's useful for seeing which modules your Lua environment
|
||||||
-- can access. It's intended usage is in an auto-complete system for Lua.
|
-- can access. It's intended usage is in an auto-complete system for Lua.
|
||||||
|
--
|
||||||
-- Known to work with Lua 5.1 and LuaJIT, on Linux.
|
-- Known to work with Lua 5.1 and LuaJIT, on Linux.
|
||||||
|
--
|
||||||
-- Author: Jmaa
|
-- ## Usage
|
||||||
-- Email: jonjmaa@gmail.com
|
--
|
||||||
-- Website: aanes.xyz
|
-- **Standalone**: The library be called as a script `luajit
|
||||||
|
|
||||||
-- "THE BEER-WARE LICENSE" (Revision 42):
|
|
||||||
-- <jonjmaa@gmail.com> wrote this file. As long as you retain this notice you
|
|
||||||
-- can do whatever you want with this stuff. If we meet some day, and you think
|
|
||||||
-- this stuff is worth it, you can buy me a beer in return.
|
|
||||||
|
|
||||||
-- TODO: Ensure it works under both Windows and MacOS.
|
|
||||||
|
|
||||||
--[[ Usage ]]--
|
|
||||||
|
|
||||||
-- Standalone: The library be called as a script `luajit
|
|
||||||
-- suggest-require.lua` to print available packages in the Lua
|
-- suggest-require.lua` to print available packages in the Lua
|
||||||
-- environment.
|
-- environment.
|
||||||
|
--
|
||||||
-- Library: Import through require. A single function is be returned.
|
-- **Library**: Import through require. A single function is be returned.
|
||||||
-- Calling this function will return the available packages, as a list
|
-- Calling this function will return the available packages, as a list
|
||||||
-- of strings.
|
-- of strings.
|
||||||
|
--
|
||||||
--[[ Example ]]--
|
-- ## Example
|
||||||
|
--
|
||||||
-- Replicating the script functionality of this library is as simple as:
|
-- Replicating the script functionality of this library is as simple as:
|
||||||
|
--
|
||||||
-- local package_names = require 'suggest-require' ()
|
-- local package_names = require 'suggest-require' ()
|
||||||
-- for _, name in ipairs(package_names) do
|
-- for _, name in ipairs(package_names) do
|
||||||
-- print('- '..name)
|
-- print('- '..name)
|
||||||
-- end
|
-- end
|
||||||
|
--
|
||||||
|
-- ## Changelog
|
||||||
|
-- - `1.4.0`: Updated repository (17. April 2025)
|
||||||
|
-- - `1.3.0`: Usage and example (6. July 2020)
|
||||||
|
-- - `1.2.0`: Unknown change (9. January 2018)
|
||||||
|
-- - `1.1.0`: Unknown change (Unknown)
|
||||||
|
-- - `1.0.0`: Initial version (September 2017)
|
||||||
|
--
|
||||||
|
-- @author Jon Michael Aanes (jonjmaa@gmail.com)
|
||||||
|
|
||||||
--[[ Changelog ]]--
|
local _VERSION = '1.4.0'
|
||||||
|
|
||||||
-- 1.3: Usage and example (6. July 2020)
|
|
||||||
-- 1.2: Unknown change (9. January 2018)
|
|
||||||
-- 1.1: Unknown change (Unknown)
|
|
||||||
-- 1.0: Initial version (September 2017)
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Platform dependant
|
-- Platform dependant
|
||||||
|
|
Loading…
Reference in New Issue
Block a user