{"id":24515623,"url":"https://github.com/magicbell/vscode-webview-starter","last_synced_at":"2025-08-12T01:06:33.349Z","repository":{"id":186096993,"uuid":"674618446","full_name":"magicbell/vscode-webview-starter","owner":"magicbell","description":"Starter template for VSCode webview extensions","archived":false,"fork":false,"pushed_at":"2023-08-31T06:31:53.000Z","size":418,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T18:42:57.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicbell.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-04T11:34:50.000Z","updated_at":"2025-05-29T13:13:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"af20bd64-819d-4a9e-817e-a57dc6cea47f","html_url":"https://github.com/magicbell/vscode-webview-starter","commit_stats":null,"previous_names":["code-inbox/vscode-webview-starter","magicbell/vscode-webview-starter"],"tags_count":5,"template":true,"template_full_name":null,"purl":"pkg:github/magicbell/vscode-webview-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fvscode-webview-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fvscode-webview-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fvscode-webview-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fvscode-webview-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicbell","download_url":"https://codeload.github.com/magicbell/vscode-webview-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fvscode-webview-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269815201,"owners_count":24479504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T01:18:37.711Z","updated_at":"2025-08-12T01:06:33.202Z","avatar_url":"https://github.com/magicbell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"899\" alt=\"codeinbox readme dark\" src=\"https://github.com/code-inbox/vscode-webview-starter/assets/11192814/12cee044-6b38-449d-a575-15d719739409\"\u003e\n\n# VSCode Webview Starter Template\n\nThis is a starter template for creating a VSCode extension with one or more webviews to be rendered in a sidebar (In VSCode parlance, it creates a dedicated `viewContainer` in the `Activity Bar` with one or more `views`). For a smooth developer-experience, the extension host and its webviews are live-reloaded on each code change.\n\nhttps://github.com/code-inbox/vscode-webview-starter/assets/11192814/c44df936-f87b-44a3-a1a9-9c53bf6d2ce4\n\n## Getting started\n\nThe build scripts assume you are running Node 16 or later.\n\n1. Clone this repository\n2. Run `npm install`\n3. Run `npm start`. This will compile the extension and open a new VSCode window with the extension loaded.\n\n## Specifying framework\n\nBy default, this template is configured to use React as the framework for the webviews. Depending on the framework you wish to use, you can change the `FRAMEWORK` variable in the `.env` file to one of the following:\n\n- `react`\n- `svelte`\n- (more coming soon)\n\n## Adding a new webview\n\nEach \"webview\" is a collapsible pane that appears in your view container. Each webview runs in a separate iframe. It can contain any HTML content you wish.\n\nAll that is required is to create a new file in the `src/views` directory. Each entry in this directory that has a file extension appropriate to the current `FRAMEWORK` will be compiled into a separate webview.\n\nFor example, if you are using React, you can create a new file called `src/views/my-view.tsx` and it will be compiled into a webview. If you are using Svelte, you can create a new file called `src/views/my-view.svelte` and it will be compiled into a webview.\n\n## State management\n\nState management for webview extensions can be tricky, because there can be multiple processes running. For example, if you have two webviews, you will have a total of three processes running:\n\n- The main VSCode process (Node)\n- The webview process for the first webview (Chromium)\n- The webview process for the second webview (Chromium)\n\nThis template uses [Zustand](https://github.com/pmndrs/zustand) for state management. You can define your state along with its update functions in `src/state.ts`, and a custom middleware will ensure that the state is kept in sync across all processes.\n\n## Styling\n\nThis template includes built-in support for [CSS Modules](https://github.com/css-modules/css-modules).\n\n## Commands\n\n### Calling commands\n\nYour users can call commands directly from the command palette, or you can call them programmatically from your main `node` process. A good place to call commands programmatically in response to state changes is in `src/node/activate.ts`. See the default code for an example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicbell%2Fvscode-webview-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicbell%2Fvscode-webview-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicbell%2Fvscode-webview-starter/lists"}