add CONTRIBUTING.md

pull/31/head
Muhammad Atif Ali 2 years ago
parent 7b91a1bbc6
commit 54a5d5711a
No known key found for this signature in database

@ -0,0 +1,42 @@
# Contributing a Module
To quickly start contributing with a new module, clone this repository and run:
```shell
./new.sh MOUDLE_NAME
```
Test a module by running an instance of Coder on your local machine:
```shell
coder server --in-memory
```
This will create a new module in the modules directory with the given name and scaffolding.
Edit the files, adding your module's implementation, documentation and screenshots.
## Testing a Module
Create a template and edit it to include your development module:
> [!NOTE]
> The Docker starter template is recommended for quick-iteration!
```hcl
module "MOUDLE_NAME" {
source = "/home/user/coder/modules/MOUDLE_NAME"
}
```
You can also test your module by specifying the source as a git repository:
```hcl
module "MOUDLE_NAME" {
source = "git::https://github.com/<USERNAME>/<REPO>.git//<FOLDER>?ref=<BRANCH>"
}
```
Build a workspace and your module will be consumed! 🥳
Open a pull-request with your module, a member of the Coder team will
manually test it, and after-merge it will appear on the Registry.

@ -30,32 +30,6 @@ module "code-server" {
Check out the [Coder Registry](https://registry.coder.com) for instructions to integrate modules into your template.
## Contributing a Module
# Contructing a Module
To quickly start contributing with a new module, clone this repository and run:
```sh
./new.sh
```
Test a module by running an instance of Coder on your local machine:
```bash
coder server --in-memory
```
Create a template and edit it to include your development module:
> *Info*
> The Docker starter template is recommended for quick-iteration!
```tf
module "testing" {
source = "/home/user/coder/modules/my-new-module"
}
```
Build a workspace and your module will be consumed! 🥳
Open a pull-request with your module, a member of the Coder team will
manually test it, and after-merge it will appear on the Registry.
See the [CONTRIBUTING.md](./CONTRIBUTING.md) file for instructions on how to construct and publish your own module to the Coder Registry.

Loading…
Cancel
Save