diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..eb8d484 --- /dev/null +++ b/CONTRIBUTING.md @@ -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//.git//?ref=" +} +``` + +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. diff --git a/README.md b/README.md index 308a45e..b01b24d 100644 --- a/README.md +++ b/README.md @@ -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).