{"id":22568499,"url":"https://github.com/expressots/expressots-vscode-ext","last_synced_at":"2025-04-10T12:34:40.461Z","repository":{"id":152702444,"uuid":"625451966","full_name":"expressots/expressots-vscode-ext","owner":"expressots","description":"Expresso TS VSCODE Extension","archived":false,"fork":false,"pushed_at":"2023-04-15T05:14:59.000Z","size":451,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T09:21:20.157Z","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/expressots.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-04-09T06:28:58.000Z","updated_at":"2023-06-17T19:25:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c5ce5f5-e75e-495e-97bc-4f9dcef4a973","html_url":"https://github.com/expressots/expressots-vscode-ext","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"09a44eee3f7424b77962159cbc264f262181245b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressots%2Fexpressots-vscode-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressots%2Fexpressots-vscode-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressots%2Fexpressots-vscode-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expressots%2Fexpressots-vscode-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/expressots","download_url":"https://codeload.github.com/expressots/expressots-vscode-ext/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704579,"owners_count":20982299,"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","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":"2024-12-08T00:13:29.320Z","updated_at":"2025-04-10T12:34:40.426Z","avatar_url":"https://github.com/expressots.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCode Webview React\n\nThis project was bootstrapped with \n* [Create React App](https://github.com/facebookincubator/create-react-app)\n* [Create React App TypeScript](https://github.com/wmonk/create-react-app-typescript)\n* [VSCode Extension Webview Sample](https://github.com/Microsoft/vscode-extension-samples/tree/master/webview-sample)\n\n[The webview API](https://code.visualstudio.com/docs/extensions/webview) allows extensions to create customizable views within VSCode. Single Page Application frameworks are perfect fit for this use case. However, to make modern JavaScript frameworks/toolchains appeal to VSCode webview API's [security best practices](https://code.visualstudio.com/docs/extensions/webview#_security) requires some knowledge of both the bundling framework you are using and how VSCode secures webview. This project aims to provide an out-of-box starter kit for Create React App and TypeScript in VSCode's webview.\n\n## Development\n\nRun following commands in the terminal\n\n```shell\nyarn install --ignore-engines\nyarn run build\n```\nAnd then press F5, in Extension Development Host session, run `Start React Webview` command from command palette.\n\n## Under the hood\n\nThings we did on top of Create React App TypeScript template\n\n* We inline `index.html` content in `ext-src/extension.ts` when creating the webview\n* We set strict security policy for accessing resources in the webview.\n  * Only resources in `/build` can be accessed\n  * Onlu resources whose scheme is `vscode-resource` can be accessed.\n* For all resources we are going to use in the webview, we change their schemes to `vscode-resource`\n* Since we only allow local resources, absolute path for styles/images (e.g., `/static/media/logo.svg`) will not work. We add a `.env` file which sets `PUBLIC_URL` to `./` and after bundling, resource urls will be relative.\n* We add baseUrl `\u003cbase href=\"${vscode.Uri.file(path.join(this._extensionPath, 'build')).with({ scheme: 'vscode-resource' })}/\"\u003e` and then all relative paths work.\n\n## Limitations\n\nRight now you can only run production bits (`yarn run build`) in the webview, how to make dev bits work (webpack dev server) is still unknown yet. Suggestions and PRs welcome !","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpressots%2Fexpressots-vscode-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpressots%2Fexpressots-vscode-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpressots%2Fexpressots-vscode-ext/lists"}