{"id":19636546,"url":"https://github.com/mizchi/swdev","last_synced_at":"2026-03-14T14:12:11.316Z","repository":{"id":40470500,"uuid":"351836113","full_name":"mizchi/swdev","owner":"mizchi","description":"No bundle frontend by service-worker","archived":false,"fork":false,"pushed_at":"2022-05-06T07:01:16.000Z","size":22827,"stargazers_count":61,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-26T11:58:16.228Z","etag":null,"topics":["deno","service-worker"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mizchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-26T15:56:54.000Z","updated_at":"2023-07-31T05:56:25.000Z","dependencies_parsed_at":"2022-08-09T21:30:28.568Z","dependency_job_id":null,"html_url":"https://github.com/mizchi/swdev","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/mizchi/swdev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizchi%2Fswdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizchi%2Fswdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizchi%2Fswdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizchi%2Fswdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mizchi","download_url":"https://codeload.github.com/mizchi/swdev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizchi%2Fswdev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254466,"owners_count":25956604,"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-10-04T02:00:05.491Z","response_time":63,"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":["deno","service-worker"],"created_at":"2024-11-11T12:29:46.173Z","updated_at":"2025-10-04T02:15:45.226Z","avatar_url":"https://github.com/mizchi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWDEV\n\nRuntime transfome by Service Worker and Deno(PoC).\n\n## How to use\n\n```bash\n# install\n$ deno install -qAf --unstable https://deno.land/x/swdev/swdev.ts\n\n$ swdev init myapp\n$ cd myapp\n$ swdev serve\n```\n\nopen http://localhost:7777\n\n_CAUTION_: port:7777 register service-worker. Unregister service-worker after develop.\n\n## How to develop\n\n```bash\n$ deno run -A --unstable swdev-dev.ts prebuild --client --worker # build __swdev-client and __swdev-server\n$ deno run -A --unstable serve.ts examples/react --local # run\n```\n\n## Concepts\n\n- Transform and cache in service-worker (`typescript` and `svelte`)\n- Cache bursting by file change event\n- Safe file read / write by `deno` permissions\n- Use deno semantics in frontend\n- Edit itself in browser\n- Bundle for production\n\n## Install\n\n```\n$ swdev init swdev-app\n$ cd swdev-app\n$ swdev serve\n```\n\n## Experimental Read/Write via websocket`\n\nRun with `--allow-write` flag.\n\n`$ swdev serve --allow-write`\n\n```ts\n// declare to touch\ndeclare const DenoProxy: {\n  exec: any;\n};\n\n// READ\nconsole.log(await DenoProxy.exec(\"readTextFile\", \"index.html\"));\n// WRITE: need --allow-write\nawait DenoProxy.exec(\"writeTextFile\", \"foo.ts\", \"export default 1;\");\n```\n\nThese features are provided by `/__swdev_client.js`\n\n## Experimental Command Run`\n\nRun with `--allow-run` flag.\n\n`$ swdev serve --allow-run`\n\n```ts\n// declare to touch\ndeclare const DenoProxy: {\n  exec: any;\n};\n\n// RUN commands\nawait DenoProxy.exec(\"run\", [\"ls\", \"-al\"]);\n```\n\n## Release build\n\n```bash\n## Build entry point\n$ swdev build #=\u003e main.bundle.js\n\n## Deploy assets\n# netlify deploy --prod -d .\n```\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmizchi%2Fswdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmizchi%2Fswdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmizchi%2Fswdev/lists"}