cluaupp 0.1.2 → 0.1.5

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/README.md +10 -13
  3. package/docs/README.md +13 -10
  4. package/docs/architecture.md +30 -73
  5. package/docs/cli.md +5 -6
  6. package/docs/comparison.md +3 -3
  7. package/docs/config.md +6 -6
  8. package/docs/cpp-advanced.md +10 -6
  9. package/docs/cpp-organization.md +4 -2
  10. package/docs/cpp-safety.md +11 -7
  11. package/docs/cpp-types.md +1 -1
  12. package/docs/examples/_category_.json +5 -0
  13. package/docs/examples/combat.md +239 -0
  14. package/docs/examples/data-boot.md +98 -0
  15. package/docs/examples/hud.md +96 -0
  16. package/docs/examples/index.md +43 -0
  17. package/docs/examples/leaderstats.md +140 -0
  18. package/docs/examples/shop.md +122 -0
  19. package/docs/examples/sword.md +108 -0
  20. package/docs/getting-started.md +14 -7
  21. package/docs/intellisense.md +31 -0
  22. package/docs/intro.md +3 -3
  23. package/docs/libraries/_category_.json +5 -0
  24. package/docs/libraries/dataservice.md +104 -0
  25. package/docs/libraries/index.md +22 -0
  26. package/docs/libraries/janitor.md +65 -0
  27. package/docs/libraries/more.md +79 -0
  28. package/docs/libraries/net.md +35 -0
  29. package/docs/libraries/promise.md +27 -0
  30. package/docs/oop/_category_.json +5 -0
  31. package/docs/oop/file-tags.md +48 -0
  32. package/docs/oop/index.md +22 -0
  33. package/docs/oop/modules.md +88 -0
  34. package/docs/oop/services.md +76 -0
  35. package/docs/print-cout.md +91 -0
  36. package/docs/syntax.md +63 -8
  37. package/editors/vscode/extension.js +146 -0
  38. package/editors/vscode/package.json +25 -0
  39. package/include/cluaupp/libs/janitor.hpp +7 -3
  40. package/include/cluaupp/roblox.hpp +19 -0
  41. package/package.json +66 -65
  42. package/runtime/Janitor/init.luau +4 -34
  43. package/src/architecture.js +174 -66
  44. package/src/cli.js +88 -21
  45. package/src/client/init.client.cpp +5 -0
  46. package/src/compile.js +77 -7
  47. package/src/editor-install.js +218 -0
  48. package/src/emit.js +321 -9
  49. package/src/headers.js +234 -0
  50. package/src/intellisense.js +1368 -0
  51. package/src/layout.js +129 -0
  52. package/src/lex.js +17 -9
  53. package/src/libs.js +165 -18
  54. package/src/lsp.js +227 -0
  55. package/src/parse.js +187 -6
  56. package/src/preprocess.js +118 -3
  57. package/src/server/leaderstats.server.cpp +28 -0
  58. package/src/shared/config.cpp +5 -0
  59. package/src/shared/config.h +3 -0
  60. package/src/understand.js +66 -6
  61. package/templates/game/.clangd +11 -0
  62. package/templates/game/.vscode/c_cpp_properties.json +6 -2
  63. package/templates/game/.vscode/extensions.json +6 -0
  64. package/templates/game/.vscode/settings.json +16 -2
  65. package/templates/game/cluaupp.config.json +2 -2
  66. package/templates/game/compile_flags.txt +2 -0
  67. package/templates/game/src/client/init.client.cpp +1 -0
  68. package/templates/game/src/server/leaderstats.server.cpp +1 -0
  69. package/docs/libraries.md +0 -80
package/docs/libraries.md DELETED
@@ -1,80 +0,0 @@
1
- ---
2
- title: Libraries
3
- sidebar_position: 20
4
- ---
5
-
6
- # Libraries
7
-
8
- Cluaupp ships **full library systems** in `CluauppLibs` (`runtime/` → `libs/` on `cluaupp init` / `build`). These are not typings and not `require(Packages.*)` stubs. `cluaupp build` copies the Luau source. `#include <cluaupp/libs/...>` injects `require(ReplicatedStorage.CluauppLibs.<Name>)`.
9
-
10
- Re-vendor from GitHub:
11
-
12
- ```bash
13
- cd cluau
14
- # clones live in vendor/ (gitignored)
15
- node scripts/vendor-libs.js
16
- ```
17
-
18
- Sources: [runtime/SOURCES.md](https://github.com/kartzDev/cluaupp/blob/main/runtime/SOURCES.md).
19
-
20
- ## Vendored from GitHub
21
-
22
- | Library | Header | GitHub | What you get |
23
- | --- | --- | --- | --- |
24
- | **Janitor** | `<cluaupp/libs/janitor.hpp>` | [howmanysmall/Janitor](https://github.com/howmanysmall/Janitor) | Add / AddPromise / LinkToInstance / Cleanup |
25
- | **Promise** | `<cluaupp/libs/promise.hpp>` | [evaera/roblox-lua-promise](https://github.com/evaera/roblox-lua-promise) | andThen + Cluaupp aliases Then / Catch / Await |
26
- | **Fusion** | `<cluaupp/libs/fusion.hpp>` | [dphfox/Fusion](https://github.com/dphfox/Fusion) | scoped, New, Value, Computed, Spring, Tween |
27
- | **Iris** | `<cluaupp/libs/iris.hpp>` | [SirMallard/Iris](https://github.com/SirMallard/Iris) | Immediate-mode debug UI |
28
- | **Cmdr** | `<cluaupp/libs/cmdr.hpp>` | [evaera/Cmdr](https://github.com/evaera/Cmdr) | Command console (server module + CmdrClient) |
29
- | **TopbarPlus** | `<cluaupp/libs/topbarplus.hpp>` | [1ForeverHD/TopbarPlus](https://github.com/1ForeverHD/TopbarPlus) | `Icon.new`, setLabel, dropdowns |
30
- | **Chrono** | `<cluaupp/libs/chrono.hpp>` | [Parihsz/Chrono](https://github.com/Parihsz/Chrono) | Custom character replication (`Chrono.Start()`) |
31
- | **DataService** | `<cluaupp/libs/dataservice.hpp>` | [KartzRbx/dataservicev2](https://github.com/KartzRbx/dataservicev2) | ProfileStore, QuickNet, Paths, Get vs GetPersisted |
32
- | **EzVisualz** | `<cluaupp/libs/ezvisual.hpp>` | [arxkdev/ezVisualz](https://github.com/arxkdev/ezVisualz) | UIGradient presets (Rainbow, Gold, …) |
33
- | **StateMachine** | `<cluaupp/libs/statemachine.hpp>` | [Prooheckcp/RobloxStateMachine](https://github.com/Prooheckcp/RobloxStateMachine) | States, transitions, LoadDirectory |
34
- | **Spring** | `<cluaupp/libs/spring.hpp>` | [nightcycle/spring](https://github.com/nightcycle/spring) | Damped spring (`new(damping, frequency, position)`) |
35
- | **Display** | `<cluaupp/libs/display.hpp>` | [nightcycle/display](https://github.com/nightcycle/display) | Pretty-print any value (`option` bundled) |
36
- | **Module3D** | `<cluaupp/libs/module3d.hpp>` | [TheNexusAvenger/Module3D](https://github.com/TheNexusAvenger/Module3D) | Model in a ViewportFrame |
37
- | **FormatNumber** | `<cluaupp/libs/formatnumber.hpp>` | [Blockzez/RobloxFormatNumber](https://github.com/Blockzez/RobloxFormatNumber) | ICU-style formatters + Abbreviate / Comma |
38
-
39
- ## Cluaupp originals
40
-
41
- | Library | Header | Role |
42
- | --- | --- | --- |
43
- | **Net** | `<cluaupp/libs/net.hpp>` | Buffer-packed RemoteEvent / RemoteFunction |
44
- | **MathUtils** | `<cluaupp/libs/math.hpp>` | Lerp, Map, Clamp, angles |
45
- | **Twinkle** | `<cluaupp/libs/twinkle.hpp>` | UI fade / slide / zoom / bounce |
46
- | **StickyBillboard** | `<cluaupp/libs/stickybillboard.hpp>` | BillboardGui on an adornee (no public GitHub) |
47
- | **VfxUtil** | `<cluaupp/libs/vfx.hpp>` | Emit / Play / CloneOnto ParticleEmitters |
48
- | **ArrayIndexer** | (types) | `Table<Manifest, "Name">` |
49
- | **Occlude** | (types) | `Keys<Data, "field">` |
50
-
51
- ```cpp
52
- #include <cluaupp/roblox.hpp>
53
- #include <cluaupp/libs/janitor.hpp>
54
- #include <cluaupp/libs/net.hpp>
55
- #include <cluaupp/libs/dataservice.hpp>
56
- #include <cluaupp/libs/formatnumber.hpp>
57
-
58
- void OnCoins(Player* player, int amount) {
59
- auto* stats = player->FindFirstChild("leaderstats");
60
- if (stats == nullptr) {
61
- return;
62
- }
63
- }
64
-
65
- void init() {
66
- auto* janitor = new Janitor();
67
- auto* coins = Net::Event("Coins");
68
- coins->On(OnCoins);
69
- print(FormatNumber::Abbreviate(1500));
70
- DataService::Server.Init(DataServiceOptions {
71
- .Template = { .Coins = 0 },
72
- .StoreName = "PlayerData",
73
- });
74
- janitor->Add(coins);
75
- }
76
- ```
77
-
78
- Wally is **optional**. The game template no longer depends on Wally for these packages. Add Wally only for extra community packages you want beside CluauppLibs.
79
-
80
- Typed Luau borders live in `runtime/<Lib>/init.luau` (Janitor, Promise, Net, MathUtils, FormatNumber, Module3D, Twinkle). Engine classes: [API](https://kartzrbx.github.io/Cluaupp/api/classes/).