4

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.

Yu Zhou
  • 41
  • 1
  • 5

2 Answers2

9
  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 :)
山茶树和葡萄树
  • 2,050
  • 1
  • 18
  • 18
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

kwood
  • 9,854
  • 2
  • 28
  • 32
  • can you help with https://stackoverflow.com/questions/45442869/how-to-publish-a-lsp-language-server-on-vscode-as-we-do-extension – invinciblejai Aug 01 '17 at 17:17