Skip to content

Commit 84ee910

Browse files
committed
Update readme code block types and todo
1 parent 8ce6ce2 commit 84ee910

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Diff for: README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The binary can be downloaded from GitHub releases. For example here is a way to
2424
download the latest release using `wget`. Replace `$os` and `$arch` with your
2525
operating system and architecture.
2626

27-
```
27+
```console
2828
wget https://github.com/coder/code-marketplace/releases/latest/download/code-marketplace-$os-$arch -O ./code-marketplace
2929
chmod +x ./code-marketplace
3030
```
@@ -33,7 +33,7 @@ chmod +x ./code-marketplace
3333

3434
The marketplace server can be ran using the `server` sub-command.
3535

36-
```
36+
```console
3737
./code-marketplace server --extensions-dir ./extensions
3838
```
3939

@@ -52,7 +52,7 @@ headers are used to generate absolute URIs to extension assets in API responses.
5252
One way to test this is to make a query and check one of the URIs in the
5353
response:
5454

55-
```
55+
```console
5656
$ curl 'https://example.com/api/extensionquery' -H 'Accept: application/json;api-version=3.0-preview.1' --compressed -H 'Content-Type: application/json' --data-raw '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"}],"pageSize":1}],"flags":439}' | jq .results[0].extensions[0].versions[0].assetUri
5757
"https://example.com/assets/vscodevim/vim/1.24.1"
5858
```
@@ -70,7 +70,7 @@ receive requests.
7070
Extensions can be added to the marketplace by file or URL. The extensions
7171
directory does not need to be created beforehand.
7272

73-
```
73+
```console
7474
./code-marketplace add extension.vsix --extensions-dir ./extensions
7575
./code-marketplace add https://domain.tld/extension.vsix --extensions-dir ./extensions
7676
```
@@ -87,13 +87,13 @@ If an extension is open source you can get it from one of three locations:
8787

8888
For example to add the Python extension from Open VSX:
8989

90-
```
90+
```console
9191
./code-marketplace add https://open-vsx.org/api/ms-python/python/2022.14.0/file/ms-python.python-2022.14.0.vsix --extensions-dir ./extensions
9292
```
9393

9494
Or the Vim extension from GitHub:
9595

96-
```
96+
```console
9797
./code-marketplace add https://github.com/VSCodeVim/Vim/releases/download/v1.24.1/vim-1.24.1.vsix --extensions-dir ./extensions
9898
```
9999

@@ -102,14 +102,14 @@ Or the Vim extension from GitHub:
102102
Extensions can be removed from the marketplace by ID and version (or use `--all`
103103
to remove all versions).
104104

105-
```
105+
```console
106106
./code-marketplace remove ms-python.python-2022.14.0 --extensions-dir ./extensions
107107
./code-marketplace remove ms-python.python --all --extensions-dir ./extensions
108108
```
109109

110110
## Usage in code-server
111111

112-
```
112+
```console
113113
export EXTENSIONS_GALLERY='{"serviceUrl":"https://<domain>/api", "itemUrl":"https://<domain>/item", "resourceUrlTemplate": "https://<domain>/files/{publisher}/{name}/{version}/{path}"}'
114114
code-server
115115
```
@@ -119,7 +119,7 @@ marketplace is running behind an https URL.
119119

120120
## Development
121121

122-
```
122+
```console
123123
make test
124124
mkdir -p extensions
125125
go run ./cmd/marketplace/main.go server --extensions-dir ./extensions
@@ -149,4 +149,3 @@ update the changelog as part of your PR.
149149
## Planned work
150150

151151
- jFrog integration for file storage.
152-
- Helm chart for deployment.

Diff for: helm/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ default `ingress` already takes care of this). These headers are used to
3333
generate absolute URIs to extension assets in API responses. One way to test
3434
this is to make a query and check one of the URIs in the response:
3535

36-
```
36+
```console
3737
$ curl 'https://example.com/api/extensionquery' -H 'Accept: application/json;api-version=3.0-preview.1' --compressed -H 'Content-Type: application/json' --data-raw '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"}],"pageSize":1}],"flags":439}' | jq .results[0].extensions[0].versions[0].assetUri
3838
"https://example.com/assets/vscodevim/vim/1.24.1"
3939
```
@@ -46,7 +46,7 @@ proxied at the root of your domain.
4646
One way to get extensions added or removed is to exec into the pod and use the
4747
marketplace binary to add and remove them.
4848

49-
```
49+
```console
5050
export POD_NAME=$(kubectl get pods -l "app.kubernetes.io/name=code-marketplace,app.kubernetes.io/instance=code-marketplace" -o jsonpath="{.items[0].metadata.name}")
5151
$ kubectl exec -it "$POD_NAME" -- /opt/code-marketplace add https://github.com/VSCodeVim/Vim/releases/download/v1.24.1/vim-1.24.1.vsix --extensions-dir /extensions
5252
```

0 commit comments

Comments
 (0)