Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ $ npx @vscode/vsce --version

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

Supported package managers:
Supported package managers (when not bundling):

- `npm >=6`
- `yarn >=1 <2`

If you [bundle](https://code.visualstudio.com/api/working-with-extensions/bundling-extension) your extension or don't have a package manager, it is recommended to use the `--no-dependencies` flag, or `vsce.dependencies: false` in your `package.json`. `vsce` will try to automatically detect the package manager and disable the option based on lockfiles, or skip dependency inclusion entirely if `node_modules` is present in your ignore patterns.

## Configuration

You can configure the behavior of `vsce` by using CLI flags (run `vsce --help` to list them all). Example:
Expand All @@ -52,12 +54,19 @@ Or you can also set them in the `package.json`, so that you avoid having to rety
{
"vsce": {
"baseImagesUrl": "https://my.custom/base/images/url",
"dependencies": true,
"dependencies": false, // almost never true
"yarn": false
}
},
"packageManager": "pnpm@11.0.0", // optional
}
```

### Override Prepublish Script

This section is optional. By default, `vsce` automatically runs the `vscode:prepublish` script in your `package.json`, using `@npmcli/run-script`.

Use the `--no-prepublish` flag with the `package` or `publish` commands to temporarily disable this behavior.

## Development

First clone this repository, then:
Expand All @@ -79,4 +88,6 @@ Tests can be executed with:
$ npm test
```

Use `VSCE_DEBUG=1` to enable debug output.

> **Note:** [Yarn](https://www.npmjs.com/package/yarn) is required to run the tests.
Loading