Yu Zhou
Yu Zhou

Reputation: 51

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.

Upvotes: 5

Views: 5085

Answers (2)

山茶树和葡萄树
山茶树和葡萄树

Reputation: 2368

  1. ready node environment, run cli: npm install -g vsce
  2. ready publish resource,
  3. open marketplace, sign in,
  4. click navbar YOUR NAME link (recommend), or menubar 'Publish extensions' link button;
  5. "create new organization", continue until done ...
  6. click organization, click the User Settings icon to the left of the avatar,
  7. click 'Personal access tokens',
  8. 'new token',
    • name is your extension name (kebab case),
    • Organization must select All accessible organizations, otherwise throw "Error: Failed Request: Unauthorized(401)";
    • ScopesShow all scopes → "Marketplace" select Acquire+Publish, create...
  9. copy token, backup to file or print it,
  10. 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.
  11. the next update, change 'package.json' 'version' field, only need run vsce login YOUR-PUBLISH-NAME, paste 'token', and run vsce publish -p YOUR-YOKEN.

The token can be regenerated on the management platform, step 7.

3/16/2022


  1. remember YOUR-PUBLISH-NAME, YOUR-YOKEN.
  2. VS Code: publish extension
  3. vsce -h do more thing :)

Upvotes: 9

kwood
kwood

Reputation: 10924

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

Upvotes: 2

Related Questions