Added more v2 specs

2025-08-28 00:42:35 +02:00
parent 4671cd2fff
commit 25f56779b6
2 changed files with 23 additions and 1 deletions

@@ -10,6 +10,14 @@ Build a module to the `.dist` directory.
--output-server|Output the build to your local server. Requires ip & port to be set (See [set](./GetiyoModuleTool#set-gmt-set-property-value)) --output-server|Output the build to your local server. Requires ip & port to be set (See [set](./GetiyoModuleTool#set-gmt-set-property-value))
--stop-server|Restart the server when the build is finished. Requires development mode to be turned on in the [config](./Config). --stop-server|Restart the server when the build is finished. Requires development mode to be turned on in the [config](./Config).
## `watch` **(V2 ONLY)**
Watch a module workspace and combine on `b` keypress.
|Argument|Description|
|-|-|
--output-server|Output the build to your local server. Requires ip & port to be set (See [set](./GetiyoModuleTool#set-gmt-set-property-value))
--stop-server|Restart the server when the build is finished. Requires development mode to be turned on in the [config](./Config).
## `create` ## `create`
Create a new development environment. GMT will ask some questions to generate the wanted environment settings. Create a new development environment. GMT will ask some questions to generate the wanted environment settings.
@@ -30,3 +38,5 @@ Update a GMT settings.
| ip | Local server ip address. | ip | Local server ip address.
| port | Local server port. | port | Local server port.
| publishkey | Publish key for the module store. | publishkey | Publish key for the module store.
| author | Default author name. Also used in default package id.
| packageroot | Default root in package id.

@@ -1,3 +1,15 @@
# Module Development - Introduction # Module Development - Introduction
TODO Modules are the building blocks of the Getiyo platform, enabling developers to create interactive experiences. Each module can be customized to provide unique functionality, from interactive games and polls to complex visualizations and custom integrations. This documentation will guide you through the process of creating, testing, and deploying your own Getiyo modules.
## V2 Modules - The Recommended Approach
[V2 modules](./V2ModuleStructure) represent the modern approach to Getiyo development, offering significant improvements for developers. Identified by a `module.ts` file, V2 modules support modern JavaScript features including import/export statements and the ability to use external npm packages. Each module operates in an isolated environment with its own dependency management, making development more maintainable and efficient. For new module development, we strongly recommend using the V2 architecture to leverage its enhanced capabilities, improved debugging experience, and better maintainability. [Read more](./V2ModuleStructure)
## V1 Modules - Legacy Support
[V1 modules](./V1ModuleStructure), identified by a `module.json` file, represent the legacy approach to building Getiyo modules. While still supported, they have several limitations: all TypeScript files are combined into a single global scope, modern JavaScript features like import/export statements aren't supported, and there's no simple method to use external Node packages. Additionally, they don't support the `gmt watch` feature for live reloading during development. These constraints make V1 modules less suitable for new development projects. [Read more](./V1ModuleStructure)
## Getiyo Module Tool
The [Getiyo Module Tool (GMT)](./GetiyoModuleTool) streamlines the module development process, offering commands to create, build, and test your modules. The `gmt create` command scaffolds a new module with the proper file structure, while `gmt build` compiles your code for testing or deployment. For V2 modules, the `gmt watch` command enables live reloading during development, significantly improving debugging efficiency.