johnpapa / vscode-angular-snippets

Angular Snippets for VS Code
MIT License
574 stars 164 forks source link

Enable Angular Snippets to run on VS Code on the web #133

Closed digitarald closed 1 year ago

digitarald commented 2 years ago

👋 I'm Harald, a PM from the VS Code team, and we recently announced VS Code for the Web at https://vscode.dev/, which provides a free, zero-install Microsoft Visual Studio Code experience running entirely in your browser. You can learn more here.

We'd like to ensure that Angular Snippets can run in the web, and we have a guide for enabling extensions for the web here. As a couple of highlights:

Feel free to reach out to me if you have questions or if I can help somehow. Thank you

johnpapa commented 2 years ago

How do you enable an extension for the web, when the extension is just snippets? There is no "web" folder in my out / dist folder.

The docs say I need this setting, but I see other snippet extensions are available in vscode.dev but they do not have the "browser" set in their package.json files

Any help is appreciated

bamurtaugh commented 2 years ago

Thanks for looking into this, @johnpapa!

@aeschli @tanhakabir do you have insights into John's question above?

tanhakabir commented 2 years ago

I believe other snippet extensions don't contain code but you have the command "angular.configureExpressServer" which contains code and some of it is not web friendly like your usage of fs in packageJson.ts

johnpapa commented 2 years ago

ah. I had forgotten that I have code to create a file in here. I can remove that, thanks.

My original question remains:

How do you enable an extension for the web, when the extension is just snippets? There is no "web" folder in my out / dist folder. The docs say I need this setting, but I see other snippet extensions are available in vscode.dev but they do not have the "browser" set in their package.json files

aeschli commented 2 years ago

If the extension has only snippets (using the contribution point contributes.snippets) (or other declarative contributions) it works as both a web and node extension, no changes needed. If the extension has code (a main entry point in package.json) it also needs a browser entry point to work in a web extension host. It can also point to an empty stub.

johnpapa commented 1 year ago

done