Skip to content

Commit

Permalink
Merge branch 'pr/xontab/457' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Mar 5, 2021
2 parents 0b789f6 + c0e0770 commit 1ee5db4
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
@@ -0,0 +1,10 @@
node_modules/
out/
npm-debug.log
!src/test/**/node_modules
package-lock.json
Dockerfile
.gitignore
LICENSE
README.md
ThirdPartyNotices.txt
4 changes: 3 additions & 1 deletion .npmignore
Expand Up @@ -9,4 +9,6 @@ yarn.lock
.travis.yml
.vscode/
out/**/*.d.ts
!out/api.d.ts
!out/api.d.ts
.dockerignore
Dockerfile
10 changes: 10 additions & 0 deletions Dockerfile
@@ -0,0 +1,10 @@
FROM node:12-alpine
WORKDIR /opt/vsce
COPY package.json .
COPY yarn.lock .
RUN yarn
COPY . .
RUN yarn compile
VOLUME /workspace
WORKDIR /workspace
ENTRYPOINT ["/opt/vsce/out/vsce"]
38 changes: 36 additions & 2 deletions README.md
Expand Up @@ -8,11 +8,45 @@

- [Node.js](https://nodejs.org/en/) at least `10.x.x`

Or simply [Docker](#via-docker).

## Usage

`vsce` is meant to be mainly used as a command line tool. It can also be used a library since it exposes a small [API](https://github.com/microsoft/vscode-vsce/blob/master/src/api.ts).
Install vsce globally:

```sh
npm install -g vsce
```

Verify the installation:

```sh
vsce --version
```

`vsce` is meant to be mainly used as a command line tool. It can also be used a library since it exposes a small [API](https://github.com/microsoft/vscode-vsce/blob/master/src/api.ts). When using vsce as a library be sure to sanitize any user input used in API calls, as a security measurement.

## Usage via Docker

You can also build a container for running vsce:

> **Warning:** When using vsce as a library be sure to sanitize any user input used in API calls, as a security measure.
```sh
git clone https://github.com/microsoft/vscode-vsce
cd vscode-vsce
docker build -t vsce .
```

Validate the container:

```sh
docker run -it vsce --version
```

Publish your local extension:

```sh
docker run -it -v $(pwd):/workspace vsce publish
```

## Development

Expand Down

0 comments on commit 1ee5db4

Please sign in to comment.