'How to publish a extension on VSCODE by myself
I use a extension on VSCODE Market, but i think that it does not meet my needs.I want to customize it.
But, i have been confused for publishing npm package to VSCODE market. Who can tell me more details?
I had been PHPER, i had been publishd some packages to Composer.
Solution 1:[1]
- ready node environment, run cli:
npm install -g vsce - ready publish resource,
- open marketplace, sign in,
- click navbar YOUR NAME link (recommend), or menubar 'Publish extensions' link button;
- "create new organization", continue until done ...
- click organization, click the
User Settingsicon to the left of the avatar, - click 'Personal access tokens',
- 'new token',
nameis your extension name (kebab case),Organizationmust selectAll accessible organizations, otherwise throw "Error: Failed Request: Unauthorized(401)";Scopes?Show all scopes? "Marketplace" selectAcquire+Publish, create...
- copy token, backup to file or print it,
- In the command line window,
- run
vsce create-publisher YOUR-PUBLISH-NAME, - "human-friendly name", enter,
- "E-mail" input YOUR-EMAIL, enter,
- "Personal Access Token", click the right mouse button to paste automatically, there will be a series of asterisk placeholders, enter,
- prompt "Successfully", run
vsce publish -p YOUR-YOKEN, - prompt "Successfully", completed the entire commit operation.
- run
- the next update, change 'package.json' 'version' field, only need run
vsce login YOUR-PUBLISH-NAME, paste 'token', and runvsce publish -p YOUR-YOKEN.
The token can be regenerated on the management platform, step 7.
3/16/2022
- remember YOUR-PUBLISH-NAME, YOUR-YOKEN.
- VS Code: publish extension
vsce -hdo more thing :)
Solution 2:[2]
The official site got you covered on publishing extensions, the whole process is very well documented here: https://code.visualstudio.com/docs/extensions/publish-extension
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | kwood |
