Improve README (#17)

* Add helper tag

* Fix source reference

* Add icons

* Update code-server README

* Update README for contributing

* Update README

* Improve readme

* Fix code-server without extensions
pull/16/head
Kyle Carberry 2 years ago committed by GitHub
parent 77b2468bf5
commit a25b637c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,41 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
<path fill-rule="evenodd" clip-rule="evenodd" d="M70.9119 99.3171C72.4869 99.9307 74.2828 99.8914 75.8725 99.1264L96.4608 89.2197C98.6242 88.1787 100 85.9892 100 83.5872V16.4133C100 14.0113 98.6243 11.8218 96.4609 10.7808L75.8725 0.873756C73.7862 -0.130129 71.3446 0.11576 69.5135 1.44695C69.252 1.63711 69.0028 1.84943 68.769 2.08341L29.3551 38.0415L12.1872 25.0096C10.589 23.7965 8.35363 23.8959 6.86933 25.2461L1.36303 30.2549C-0.452552 31.9064 -0.454633 34.7627 1.35853 36.417L16.2471 50.0001L1.35853 63.5832C-0.454633 65.2374 -0.452552 68.0938 1.36303 69.7453L6.86933 74.7541C8.35363 76.1043 10.589 76.2037 12.1872 74.9905L29.3551 61.9587L68.769 97.9167C69.3925 98.5406 70.1246 99.0104 70.9119 99.3171ZM75.0152 27.2989L45.1091 50.0001L75.0152 72.7012V27.2989Z" fill="white"/>
</mask>
<g mask="url(#mask0)">
<path d="M96.4614 10.7962L75.8569 0.875542C73.4719 -0.272773 70.6217 0.211611 68.75 2.08333L1.29858 63.5832C-0.515693 65.2373 -0.513607 68.0937 1.30308 69.7452L6.81272 74.754C8.29793 76.1042 10.5347 76.2036 12.1338 74.9905L93.3609 13.3699C96.086 11.3026 100 13.2462 100 16.6667V16.4275C100 14.0265 98.6246 11.8378 96.4614 10.7962Z" fill="#0065A9"/>
<g filter="url(#filter0_d)">
<path d="M96.4614 89.2038L75.8569 99.1245C73.4719 100.273 70.6217 99.7884 68.75 97.9167L1.29858 36.4169C-0.515693 34.7627 -0.513607 31.9063 1.30308 30.2548L6.81272 25.246C8.29793 23.8958 10.5347 23.7964 12.1338 25.0095L93.3609 86.6301C96.086 88.6974 100 86.7538 100 83.3334V83.5726C100 85.9735 98.6246 88.1622 96.4614 89.2038Z" fill="#007ACC"/>
</g>
<g filter="url(#filter1_d)">
<path d="M75.8578 99.1263C73.4721 100.274 70.6219 99.7885 68.75 97.9166C71.0564 100.223 75 98.5895 75 95.3278V4.67213C75 1.41039 71.0564 -0.223106 68.75 2.08329C70.6219 0.211402 73.4721 -0.273666 75.8578 0.873633L96.4587 10.7807C98.6234 11.8217 100 14.0112 100 16.4132V83.5871C100 85.9891 98.6234 88.1786 96.4586 89.2196L75.8578 99.1263Z" fill="#1F9CF0"/>
</g>
<g style="mix-blend-mode:overlay" opacity="0.25">
<path fill-rule="evenodd" clip-rule="evenodd" d="M70.8511 99.3171C72.4261 99.9306 74.2221 99.8913 75.8117 99.1264L96.4 89.2197C98.5634 88.1787 99.9392 85.9892 99.9392 83.5871V16.4133C99.9392 14.0112 98.5635 11.8217 96.4001 10.7807L75.8117 0.873695C73.7255 -0.13019 71.2838 0.115699 69.4527 1.44688C69.1912 1.63705 68.942 1.84937 68.7082 2.08335L29.2943 38.0414L12.1264 25.0096C10.5283 23.7964 8.29285 23.8959 6.80855 25.246L1.30225 30.2548C-0.513334 31.9064 -0.515415 34.7627 1.29775 36.4169L16.1863 50L1.29775 63.5832C-0.515415 65.2374 -0.513334 68.0937 1.30225 69.7452L6.80855 74.754C8.29285 76.1042 10.5283 76.2036 12.1264 74.9905L29.2943 61.9586L68.7082 97.9167C69.3317 98.5405 70.0638 99.0104 70.8511 99.3171ZM74.9544 27.2989L45.0483 50L74.9544 72.7012V27.2989Z" fill="url(#paint0_linear)"/>
</g>
</g>
<defs>
<filter id="filter0_d" x="-8.39411" y="15.8291" width="116.727" height="92.2456" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.16667"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="overlay" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
<filter id="filter1_d" x="60.4167" y="-8.07558" width="47.9167" height="116.151" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset/>
<feGaussianBlur stdDeviation="4.16667"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="overlay" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
<linearGradient id="paint0_linear" x1="49.9392" y1="0.257812" x2="49.9392" y2="99.7423" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M14.36 31.847c-4.705 1.147-7.91 3.41-7.91 6 0 1.617 1.235 3.088 3.264 4.235-.618-.97-.94-2.03-.94-3.088.03-2.676 2.117-5.176 5.587-7.146zM64 41.992c0-1.706-1.06-3.264-2.823-4.558.147.53.265 1.06.265 1.588 0 4.852-6.793 9.028-16.44 10.763a31.33 31.33 0 0 0 3.382.176C57 49.932 64 46.374 64 41.992zm-5.558-2.647c0-1.794-1.53-3.44-4.146-4.793.618.735.94 1.53.94 2.353 0 4.323-9.175 7.822-20.526 7.822-11.322 0-20.526-3.5-20.526-7.822 0-.56.147-1.088.44-1.588-1.823 1.206-2.853 2.588-2.853 4.058 0 4.676 10.44 8.47 23.32 8.47s23.35-3.852 23.35-8.5zM48.267 39.1c-4.764 3.058-19.41 4.235-25.702.294-4.94-3.088-3.235-8-17.38-18.762-1.853-1.412.353-2.91 1.735-1.94s.118 1.206 2.91 4c5.646 5.646 5.587.56 6.47 2.5 1.882 4.03 6 8.087 6 8.087 4.146 2.705 7.44 3.294 13.557-.853 3.882-2.617 2.294 4.176 11.792-.735 3.47-1.794 3.323-.588 6.852-5.5 1.47-2.03 4.264 1.56 1.088 2.06-1.265.206-3.41 1.588-4.323 3.764-1.323 3.264-.765 5.676-3 7.087zM21.86 30.818c-1.176-.53-2.41-2.53-2.882-3.323 1.323-1.294.794-3.44.03-4.617-.735-1.176-1.647-.853-2.617-1.94-1-1.088.382-3.91 1.647-1.735 4.735 8.146 7.852 4.764 11.704 4.264 3.705-.47 7 1.56 8-4.176.176-.94 1.088-1.147 1.176.382.088 1.56.676 5.323 2.705 5.793 2.03.5 3.676-.47 4.146-1s.735-.47.94.882c.206 1.323.735 3.176 3.588 1.117 5.852-4.176 4.176-5.793 6.47-6.88 1.294-.618 3.352 1.382.382 2.882-4.235 2.147-4.676 4.793-7.352 6.47-4.5 2.823-3.117.118-10.35-.912-2.794-.382-3.676 2.705-5.852 1.823-4.97-2.06-8.47-1.647-11.734.97zm15.674-15.086c.176 1.235.382 1.206.823 1.294.44.118 1-.588 1-1.235.03-.676-.294-1.088-.94-1.06-.676.03-.912.353-.882 1zm21.76 2.206c.53.5 1.94.176 2.264-.206.853-.94.882-1.5.44-2.147-.44-.618-1.353-.53-2.264.147s-.735 1.94-.44 2.206zm-.382 6.234c-.44.588-.47 1.03-.147 1.353.353.353 1.06.647 1.56.265.5-.412.5-1 .088-1.5-.44-.53-1.03-.53-1.5-.118zm-44.64-7.352c.676.206 1 .853 1.56.118.294-.353.323-.853-.06-1.382-.235-.323-1.353-.56-1.823-.088s-.03 1.235.323 1.353zM.48 16.408c1.235.765 2.03 1.91 2.97.882.323-.353.706-.97.03-2.206-.5-.912-2.117-1.265-2.676-.912C.215 14.496-.5 15.82.48 16.408zm11.38 5.852c.382.412 1.06.382 1.47.147.382-.235.323-.853-.06-1.382-.235-.323-.94-.5-1.412 0s-.265.94 0 1.235z" fill="#41bf47"/></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -1,19 +1,60 @@
# Modules <div align="center">
<h1>
Modules
</h1>
Enjoy official, community, and partner modules to extend your Coder workspace. [Registry](https://registry.coder.com) | [Coder Docs](https://coder.com/docs) | [Why Coder](https://coder.com/why) | [Coder Enterprise](https://coder.com/docs/v2/latest/enterprise)
- [code-server](https://registry.coder.com/modules/code-server): Run VS Code in the browser [![discord](https://img.shields.io/discord/747933592273027093?label=discord)](https://discord.gg/coder)
- [personalize](https://registry.coder.com/modules/personalize): Execute a user-specific script on start [![license](https://img.shields.io/github/license/coder/modules)](./LICENSE)
- [VS Code Desktop](https://registry.coder.com/modules/vscode-desktop): Display a button to launch VS Code desktop in the dashboard.
</div>
Modules extend Templates to create reusable components for your development environment.
e.g.
```hcl
module "code-server" {
source = "https://registry.coder.com/modules/code-server"
agent_id = coder_agent.main.id
}
```
- [code-server](https://registry.coder.com/modules/code-server): Install on start, create an app to access via the dashboard, install extensions, and pre-configure editor settings.
- [personalize](https://registry.coder.com/modules/personalize): Run a script on workspace start that allows developers to run custom commands to personalize their workspace.
- [VS Code Desktop](https://registry.coder.com/modules/vscode-desktop): Add a button to open any workspace in VS Code with a single click.
## Registry ## Registry
Check out the [Coder Registry](https://registry.coder.com) for instructions to integrate modules into your template. Check out the [Coder Registry](https://registry.coder.com) for instructions to integrate modules into your template.
## Adding a new module ## Contributing a Module
To quickly start contributing with a new module, clone this repository and run: To quickly start contributing with a new module, clone this repository and run:
```sh ```sh
./new.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.

@ -1,16 +1,15 @@
--- ---
display_name: code-server display_name: code-server
description: VS Code in the browser description: VS Code in the browser
icon: ../icons/code.svg icon: ../.icons/code.svg
maintainer_github: coder maintainer_github: coder
verified: true verified: true
tags: [helper] tags: [helper, ide]
--- ---
# code-server # code-server
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and Automatically install [code-server](https://github.com/coder/code-server) in a workspace, create an app to access it via the dashboard, install extensions, and pre-configure editor settings.
access it in the browser.
![Screenshot 1](https://github.com/coder/code-server/raw/main/docs/assets/screenshot-1.png?raw=true) ![Screenshot 1](https://github.com/coder/code-server/raw/main/docs/assets/screenshot-1.png?raw=true)
![Screenshot 2](https://github.com/coder/code-server/raw/main/docs/assets/screenshot-2.png?raw=true) ![Screenshot 2](https://github.com/coder/code-server/raw/main/docs/assets/screenshot-2.png?raw=true)
@ -24,24 +23,24 @@ access it in the browser.
## Examples ## Examples
### Extensions ### Pre-install Extensions
Automatically install extensions from [OpenVSX](https://open-vsx.org/): Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
```hcl ```hcl
module "code-server" { module "code-server" {
source = "https://registry.coder.com/modules/code-server" source = "https://registry.coder.com/modules/code-server"
extensions = [ extensions = [
" "dracula-theme.theme-dracula"
] ]
} }
``` ```
Enter the `<author>.<name>` into the extensions array and code-server will automatically install on start. Enter the `<author>.<name>` into the extensions array and code-server will automatically install on start.
### Settings ### Pre-configure Settings
Pre-configure code-server with settings: Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:
```hcl ```hcl
module "settings" { module "settings" {

@ -3,7 +3,7 @@ terraform {
required_providers { required_providers {
coder = { coder = {
source = "terraform.local/coder/coder" source = "coder/coder"
version = ">= 0.12" version = ">= 0.12"
} }
} }

@ -17,6 +17,9 @@ CODE_SERVER="${INSTALL_PREFIX}/bin/code-server"
# Install each extension... # Install each extension...
for extension in "$${EXTENSIONS[@]}"; do for extension in "$${EXTENSIONS[@]}"; do
if [ -z "$extension" ]; then
continue
fi
printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n" printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n"
output=$($CODE_SERVER --install-extension "$extension") output=$($CODE_SERVER --install-extension "$extension")
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then

@ -1,7 +1,7 @@
--- ---
display_name: JFrog display_name: JFrog
description: Install the JF CLI and authenticate with Artifactory description: Install the JF CLI and authenticate with Artifactory
icon: ../icons/jfrog.svg icon: ../.icons/jfrog.svg
maintainer_github: coder maintainer_github: coder
partner_github: jfrog partner_github: jfrog
verified: true verified: true

@ -1,7 +1,7 @@
--- ---
display_name: Personalize display_name: Personalize
description: Allow developers to customize their workspace on start description: Allow developers to customize their workspace on start
icon: ../icons/personalize.svg icon: ../.icons/personalize.svg
maintainer_github: coder maintainer_github: coder
verified: true verified: true
tags: [helper] tags: [helper]

@ -3,7 +3,7 @@ terraform {
required_providers { required_providers {
coder = { coder = {
source = "terraform.local/coder/coder" source = "coder/coder"
version = ">= 0.12" version = ">= 0.12"
} }
} }

@ -1,7 +1,7 @@
--- ---
display_name: VS Code Desktop display_name: VS Code Desktop
description: Add a one-click button to launch VS Code Desktop description: Add a one-click button to launch VS Code Desktop
icon: ../icons/code.svg icon: ../.icons/code.svg
maintainer_github: coder maintainer_github: coder
verified: true verified: true
--- ---

@ -3,7 +3,7 @@ terraform {
required_providers { required_providers {
coder = { coder = {
source = "terraform.local/coder/coder" source = "coder/coder"
version = ">= 0.12" version = ">= 0.12"
} }
} }

Loading…
Cancel
Save