Skip to content

Commit eaff786

Browse files
committed
fix: add new language module and update shadcn docs
1 parent 0c8bd18 commit eaff786

26 files changed

+7656
-3784
lines changed

assets/css/tailwind.css

Lines changed: 63 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,95 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
3+
@config '../../tailwind.config.js';
4+
/* If you are using shadcn-docs-nuxt in a monorepo, change the amount of .. to match the node_modules directory */
5+
@source '../../node_modules/shadcn-docs-nuxt';
6+
7+
@layer base {
8+
*,
9+
::after,
10+
::before,
11+
::backdrop,
12+
::file-selector-button {
13+
border-color: var(--color-gray-200, currentcolor);
14+
}
15+
}
16+
17+
@utility step {
18+
counter-increment: step;
19+
20+
&:before {
21+
@apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background;
22+
@apply -ml-[50px] -mt-1;
23+
content: counter(step);
24+
}
25+
}
426

527
@layer base {
628
:root {
729
--background: 0 0% 100%;
830
--foreground: 222.2 84% 4.9%;
9-
31+
1032
--card: 0 0% 100%;
1133
--card-foreground: 222.2 84% 4.9%;
12-
34+
1335
--popover: 0 0% 100%;
1436
--popover-foreground: 222.2 84% 4.9%;
15-
37+
1638
--primary: 221.2 83.2% 53.3%;
1739
--primary-foreground: 210 40% 98%;
18-
40+
1941
--secondary: 210 40% 96.1%;
2042
--secondary-foreground: 222.2 47.4% 11.2%;
21-
43+
2244
--muted: 210 40% 96.1%;
2345
--muted-foreground: 215.4 16.3% 46.9%;
24-
46+
2547
--accent: 210 40% 96.1%;
2648
--accent-foreground: 222.2 47.4% 11.2%;
27-
49+
2850
--destructive: 0 84.2% 60.2%;
2951
--destructive-foreground: 210 40% 98%;
30-
31-
--border:214.3 31.8% 91.4%;
32-
--input:214.3 31.8% 91.4%;
33-
--ring:221.2 83.2% 53.3%;
52+
53+
--border: 214.3 31.8% 91.4%;
54+
--input: 214.3 31.8% 91.4%;
55+
--ring: 221.2 83.2% 53.3%;
3456
--radius: 0.5rem;
3557
}
36-
58+
3759
.dark {
38-
--background:222.2 84% 4.9%;
39-
--foreground:210 40% 98%;
40-
41-
--card:222.2 84% 4.9%;
42-
--card-foreground:210 40% 98%;
43-
44-
--popover:222.2 84% 4.9%;
45-
--popover-foreground:210 40% 98%;
46-
47-
--primary:217.2 91.2% 59.8%;
48-
--primary-foreground:222.2 47.4% 11.2%;
49-
50-
--secondary:217.2 32.6% 17.5%;
51-
--secondary-foreground:210 40% 98%;
52-
53-
--muted:217.2 32.6% 17.5%;
54-
--muted-foreground:215 20.2% 65.1%;
55-
56-
--accent:217.2 32.6% 17.5%;
57-
--accent-foreground:210 40% 98%;
58-
59-
--destructive:0 62.8% 30.6%;
60-
--destructive-foreground:210 40% 98%;
61-
62-
--border:217.2 32.6% 17.5%;
63-
--input:217.2 32.6% 17.5%;
64-
--ring:224.3 76.3% 48%;
65-
}
66-
}
60+
--background: 222.2 84% 4.9%;
61+
--foreground: 210 40% 98%;
6762

68-
@layer utilities {
69-
.step {
70-
counter-increment: step;
71-
}
63+
--card: 222.2 84% 4.9%;
64+
--card-foreground: 210 40% 98%;
7265

73-
.step:before {
74-
@apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background;
75-
@apply -ml-[50px] -mt-1;
76-
content: counter(step);
66+
--popover: 222.2 84% 4.9%;
67+
--popover-foreground: 210 40% 98%;
68+
69+
--primary: 217.2 91.2% 59.8%;
70+
--primary-foreground: 222.2 47.4% 11.2%;
71+
72+
--secondary: 217.2 32.6% 17.5%;
73+
--secondary-foreground: 210 40% 98%;
74+
75+
--muted: 217.2 32.6% 17.5%;
76+
--muted-foreground: 215 20.2% 65.1%;
77+
78+
--accent: 217.2 32.6% 17.5%;
79+
--accent-foreground: 210 40% 98%;
80+
81+
--destructive: 0 62.8% 30.6%;
82+
--destructive-foreground: 210 40% 98%;
83+
84+
--border: 217.2 32.6% 17.5%;
85+
--input: 217.2 32.6% 17.5%;
86+
--ring: 224.3 76.3% 48%;
7787
}
7888
}
7989

8090
@layer base {
8191
* {
82-
@apply border-border;
92+
@apply border-border outline-ring/50;
8393
}
8494

8595
body {

content/4.languages/0.languages.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ to: /languages/golang/quick-start
5050
Learn how to create a plugin using Golang, export and import methods, and integrate plugins written in different languages within Plugify.
5151
::
5252

53+
::card
54+
---
55+
title: Lua
56+
icon: vscode-icons:file-type-lua
57+
to: /languages/lua/quick-start
58+
---
59+
Learn how to create a plugin using Lua, export and import methods, and integrate plugins written in different languages within Plugify.
60+
::
61+
5362
::card
5463
---
5564
title: Dlang
@@ -58,15 +67,14 @@ to: /languages/dlang/quick-start
5867
---
5968
Learn how to create a plugin using Dlang, export and import methods, and integrate plugins written in different languages within Plugify.
6069
::
61-
::
62-
6370

6471
::card
6572
---
6673
title: Couldn't find the module you need?
6774
icon: lucide:code
6875
to: /developer-guides/writing-language-module
6976
---
70-
Contribute by adding your own language module!
77+
Contribute by creating your own language module!
78+
::
7179
::
7280

content/4.languages/3.csharp/2.first-plugin.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,17 @@ namespace ExamplePlugin
144144
{
145145
void OnPluginStart()
146146
{
147-
Console.WriteLine($"{Name}: OnStart");
147+
Console.WriteLine(".NET: OnStart");
148148
}
149149

150150
void OnPluginUpdate(float dt)
151151
{
152-
Console.WriteLine($"{Name}: OnUpdate");
152+
Console.WriteLine(".NET: OnUpdate");
153153
}
154154

155155
void OnPluginEnd()
156156
{
157-
Console.WriteLine($"{Name}: OnEnd");
157+
Console.WriteLine(".NET: OnEnd");
158158
}
159159
}
160160
}

content/4.languages/4.javascript/3.export-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The following table lists how types are exposed to the JavaScript API:
5555
| plg::vec2 | Vector2 | vec2 ||
5656
| plg::vec3 | Vector3 | vec3 ||
5757
| plg::vec4 | Vector4 | vec4 ||
58-
| plg::mat4x4 | Mattor4x4 | mat4x4 ||
58+
| plg::mat4x4 | Matrix4x4 | mat4x4 ||
5959

6060
## **Exporting Functions in JavaScript**
6161

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Quick start
3+
description: Quick start with Lua language module.
4+
icon: lucide:rocket
5+
---
6+
7+
Welcome to the **Lua Language Module** for Plugify! This module enables developers to write **powerful and dynamic plugins** using **Lua**. Whether you're building interactive tools, automating tasks, or embedding logic, Lua’s **lightweight and embeddable design** makes it an ideal choice for extending Plugify.
8+
9+
## What is the Lua Language Module?
10+
11+
The **Lua Language Module** allows you to create plugins using the **lightweight and fast Lua scripting language**, widely used in games and embedded systems. This means you can:
12+
13+
1. [x] **Write and execute Lua plugins** with minimal setup
14+
2. [x] **Use a simple and expressive syntax**
15+
3. [x] **Run plugins efficiently with minimal memory footprint**
16+
4. [x] **Integrate seamlessly with Plugify and other plugins**
17+
18+
Lua’s **coroutine-based concurrency** and **extensibility** make it perfect for **real-time interactions**, while its small size ensures fast loading and easy distribution.
19+
20+
## Why Use Lua for Plugify?
21+
22+
Lua is a **lightweight scripting language** known for its simplicity and performance:
23+
24+
* **Fast & Lightweight** – Designed for embedded use and fast execution
25+
* **Simple & Easy to Learn** – Minimal syntax and easy to read
26+
* **Embeddable by Design** – Ideal for scripting within applications
27+
* **Powerful Metaprogramming** – Flexible tables and metatables
28+
29+
Whether you're a **game developer**, a **systems integrator**, or simply want a **compact, fast** way to build Plugify plugins, **Lua is a great choice!**
30+
31+
## How Does It Work?
32+
33+
The Lua Language Module makes it easy to:
34+
35+
1. **Write plugins in pure Lua**
36+
2. **Load and execute them in Plugify’s Lua runtime**
37+
3. **Use standard Lua libraries and idioms**
38+
4. **Communicate with other plugins using Plugify’s API**
39+
40+
You get **full access to Lua’s expressive scripting capabilities** with the performance benefits of its minimal runtime.
41+
42+
## Who is This For?
43+
44+
The Lua Language Module is perfect for:
45+
46+
* **Game Developers** who already use Lua in their engines
47+
* **Automation Enthusiasts** who want small, event-driven scripts
48+
* **Software Engineers** looking for a fast, embeddable plugin system
49+
* **Anyone who wants an easy way to extend Plugify with Lua**
50+
51+
## Next Steps
52+
53+
Ready to start developing with Lua? Check out the **full documentation** for setup, examples, and best practices.
54+
55+
::alert{type="info" icon="lucide:info"}
56+
If you’re familiar with Lua, **you can start building Plugify plugins right away!**
57+
::
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Installation
3+
description: Step-by-step guide to install the language module and set up the necessary environment to start using it.
4+
icon: lucide:download
5+
---
6+
7+
The **Lua Language Module** can be installed in two ways: manually downloading the release or using the Plugify package manager. This guide explains both methods and provides step-by-step instructions.
8+
9+
## **Method 1: Manual Installation**
10+
11+
::steps
12+
### **Download the Release**
13+
1. Go to the [Lua Language Module repository](https://github.com/untrustedmodders/plugify-module-lua).
14+
2. Navigate to the **Releases** section.
15+
3. Download the latest release package (e.g., `plugify-module-lua.zip`).
16+
17+
### **Extract the Package**
18+
1. Extract the downloaded package to a temporary directory.
19+
20+
### **Place the Module in the Modules Folder**
21+
1. Locate the `modules` folder in your Plugify installation directory.
22+
2. Copy the extracted module files into the `modules` folder.
23+
24+
### **Verify Installation**
25+
1. Start Plugify.
26+
2. The Lua Language Module should now be available for use.
27+
::
28+
29+
## **Method 2: Installation via Package Manager**
30+
31+
::steps
32+
### **Add the Repository (if needed)**
33+
If the Lua Language Module is not found in the default package repository, you need to add the repository manually.
34+
35+
#### **Option A: Add Repository via Command**
36+
1. Run the following command in your terminal:
37+
```bash
38+
plg repo https://untrustedmodders.github.io/plugify-module-lua/plugify-module-lua.json
39+
```
40+
41+
#### **Option B: Add Repository via `plugify.pconfig`**
42+
1. Open the `plugify.pconfig` file in your Plugify installation directory.
43+
2. Add the following line under the `repositories` section:
44+
```json
45+
{
46+
"repositories": [
47+
"https://untrustedmodders.github.io/plugify-module-lua/plugify-module-lua.json"
48+
]
49+
}
50+
```
51+
52+
### **Install the Module**
53+
1. Run the following command in your terminal:
54+
```bash
55+
plg install plugify-module-lua
56+
```
57+
58+
### **Verify Installation**
59+
1. Start Plugify.
60+
2. The Lua Language Module should now be installed and ready for use.
61+
::
62+
63+
## **Folder Structure**
64+
65+
After installation, the Lua Language Module should have the following folder structure:
66+
67+
::file-tree
68+
---
69+
tree:
70+
- res/modules:
71+
- plugify-module-lua:
72+
- bin:
73+
- plugify-module-lua.dll
74+
- libplugify-module-lua.so
75+
- ^plugify-module-lua.pmodule^
76+
---
77+
::
78+
79+
### **Explanation**
80+
- **`res/modules/plugify-module-lua`**: The root folder for the Lua Language Module.
81+
- **`bin`**: Contains the compiled module binaries (`.dll` for Windows, `.so` for Linux and `.dylib` for macOS).
82+
- **`plugify-module-lua.pmodule`**: The module manifest file that describes the module and its language.
83+
84+
## **Troubleshooting**
85+
86+
### **Module Not Found**
87+
- Ensure the repository URL is correct and accessible.
88+
- Verify that the repository has been added to `plugify.pconfig` or via the `plg repo <url>` command.
89+
90+
### **Installation Fails**
91+
- Check your internet connection.
92+
- Ensure you have the latest version of Plugify installed.
93+

0 commit comments

Comments
 (0)