You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,15 @@ Just add `require "moonloader"` line into your autorun!
16
16
```lua
17
17
require"moonloader"
18
18
```
19
-
2. Include your `.moon` file with `include`
19
+
2. Include your `.moon`/`.yue` file with `include`
20
20
```lua
21
-
-- you can use example/init.moon, but for the sake of compability
22
-
--I suggest to use .lua instead of .moon
23
-
include"example/init.lua" -- Will automatically generate .lua from .moon in garrysmod/cache/moonloader/lua
21
+
-- you need to pass `.lua` to include since Garry's Mod wont accept anything else
22
+
--but gm_moonloader will find a .moon file and load it
23
+
include"example/init.lua" -- Will automatically generate .lua from .moon/.yue in garrysmod/cache/moonloader/lua
24
24
```
25
-
3. (optional) before using finding lua files with `file.Find` or reading them I suggest to use `moonloader.PreCacheDir("yourdirectory")` to compile .lua files from all .moon files
26
25
27
26
## Notes
28
-
* Compiled `.moon` files are stored in `garrysmod/cache/moonloader/lua` folder. This folder is cleaned up after each startup.
27
+
* Compiled `.moon`/`.yue` files are stored in `garrysmod/cache/moonloader/lua` folder. This folder is cleaned up after each startup.
0 commit comments