From 54a5d5711abde42a93d14377274035d63fd433c7 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 22 Sep 2023 18:11:22 +0300 Subject: [PATCH 1/5] add CONTRIBUTING.md --- CONTRIBUTING.md | 42 ++++++++++++++++++++++++++++++++++++++++++ README.md | 30 ++---------------------------- 2 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..629ca651 --- /dev/null +++ b/CONTRIBUTING.md @@ -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//.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 308a45e3..08849538 100644 --- a/README.md +++ b/README.md @@ -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. From 34e1ba99bc527e3e02d070a922f980e8ae564d40 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 22 Sep 2023 18:16:30 +0300 Subject: [PATCH 2/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 629ca651..5135cc9f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing a Module +# Contributing To quickly start contributing with a new module, clone this repository and run: From 1f80d1a6b27c71a9e0a0ed34456daa20053149b1 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 22 Sep 2023 18:18:23 +0300 Subject: [PATCH 3/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5135cc9f..eb8d4844 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -To quickly start contributing with a new module, clone this repository and run: +To create a new module, clone this repository and run: ```shell ./new.sh MOUDLE_NAME From 91d066296c01505eddf9ca9898f8f565bf58cd51 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 22 Sep 2023 18:18:52 +0300 Subject: [PATCH 4/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08849538..c9320cdf 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,6 @@ module "code-server" { Check out the [Coder Registry](https://registry.coder.com) for instructions to integrate modules into your template. -# Contructing a Module +# Contributing a Module -See the [CONTRIBUTING.md](./CONTRIBUTING.md) file for instructions on how to construct and publish your own module to the Coder Registry. +See [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to construct and publish a module to the [Coder Registry](https://registry.coder.com). From 7a3249ab7c295c91072e71f5e1c6672a626827b6 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 22 Sep 2023 18:19:23 +0300 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9320cdf..b01b24d0 100644 --- a/README.md +++ b/README.md @@ -30,6 +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 +## Contributing a Module See [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to construct and publish a module to the [Coder Registry](https://registry.coder.com).