lenix 1.6.3 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/oop/README.md DELETED
@@ -1,30 +0,0 @@
1
- # Lua Object Oriented Programming Class Module
2
-
3
- Lua object oriented programming class module allow you to use oop similar to the TypeScript/JavaScript/Java/C++ Classes
4
-
5
- ## Lua Modules Setup
6
-
7
- Auto-configure Lua to use `./lua_modules` (like `node_modules`) instead of unorganized directories.
8
-
9
- ### Install
10
-
11
- - MAC
12
-
13
- ```bash
14
- npx mac-lua-modules
15
- ```
16
-
17
- ### Usage
18
-
19
- ```bash
20
- # Install Lua packages
21
- luarocks install --tree ./lua_modules inspect
22
-
23
- # Use in code (no setup needed)
24
- local inspect = require('inspect')
25
- print(inspect({name = "Lenix"}))
26
- ```
27
-
28
- ### What it does
29
-
30
- Adds environment variables to your shell config (for mac users: `~/.zshrc` or `~/.bashrc`) to automatically change your Lua modules configurations to `./lua_modules` instead of hidden nested directories.
@@ -1,65 +0,0 @@
1
- #!/bin/bash
2
-
3
- if [ -n "$ZSH_VERSION" ]; then
4
- SHELL_CONFIG="${HOME}/.zshrc"
5
- elif [ -n "$BASH_VERSION" ]; then
6
- SHELL_CONFIG="${HOME}/.bashrc"
7
- PROFILE_CONFIG="${HOME}/.bash_profile"
8
- else
9
- SHELL_CONFIG="${HOME}/.profile"
10
- fi
11
-
12
- touch "$SHELL_CONFIG"
13
-
14
- echo "===================================="
15
- echo "Lua Modules Setup"
16
- echo "===================================="
17
- echo ""
18
- echo "This script will add the following lines to: $SHELL_CONFIG"
19
- echo ""
20
- echo "eval \$(luarocks path --bin)"
21
- echo "export LUA_PATH=\"./lua_modules/share/lua/5.4/?.lua;./lua_modules/share/lua/5.4/?/init.lua;;\""
22
- echo "export LUA_CPATH=\"./lua_modules/lib/lua/5.4/?.so;;\""
23
- echo ""
24
- read -p "Continue? (y/n) " -n 1 -r
25
- echo ""
26
-
27
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
28
- echo "Installation cancelled."
29
- exit 1
30
- fi
31
-
32
- if grep -q "# Lua local modules setup" "$SHELL_CONFIG"; then
33
- echo " Already installed in $SHELL_CONFIG"
34
- echo "Installation aborted."
35
- exit 0
36
- fi
37
-
38
- echo '' >> "$SHELL_CONFIG"
39
- echo '# Lua local modules setup' >> "$SHELL_CONFIG"
40
- echo 'eval $(luarocks path --bin)' >> "$SHELL_CONFIG"
41
- echo 'export LUA_PATH="./lua_modules/share/lua/5.4/?.lua;./lua_modules/share/lua/5.4/?/init.lua;;"' >> "$SHELL_CONFIG"
42
- echo 'export LUA_CPATH="./lua_modules/lib/lua/5.4/?.so;;"' >> "$SHELL_CONFIG"
43
- echo '# Lua local modules end.' >> "$SHELL_CONFIG"
44
-
45
- if [ -n "$BASH_VERSION" ] && [ -n "$PROFILE_CONFIG" ]; then
46
- touch "$PROFILE_CONFIG"
47
- if ! grep -q "source.*bashrc" "$PROFILE_CONFIG"; then
48
- echo '' >> "$PROFILE_CONFIG"
49
- echo '# Source .bashrc' >> "$PROFILE_CONFIG"
50
- echo 'if [ -f ~/.bashrc ]; then source ~/.bashrc; fi' >> "$PROFILE_CONFIG"
51
- fi
52
- fi
53
-
54
- source "$SHELL_CONFIG" 2>/dev/null || true
55
-
56
- echo ""
57
- echo "Setup complete!"
58
- echo "Added to: $SHELL_CONFIG"
59
- echo ""
60
- echo "Usage:"
61
- echo " luarocks install --tree ./lua_modules <package>"
62
- echo ""
63
- echo " IMPORTANT: Restart your terminal for changes to take effect"
64
- echo ""
65
- echo "To undo, remove lines containing '# Lua local modules setup' from $SHELL_CONFIG"