Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

add CONTRIBUTING.md #31

Merged
merged 5 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing

To create 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.
28 changes: 1 addition & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,4 @@ Check out the [Coder Registry](https://registry.coder.com) for instructions to i

## Contributing 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 [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to construct and publish a module to the [Coder Registry](https://registry.coder.com).