{"id":21992020,"url":"https://github.com/elct9620/esbuild-fs","last_synced_at":"2025-08-27T22:26:01.094Z","repository":{"id":179637000,"uuid":"663807426","full_name":"elct9620/esbuild-fs","owner":"elct9620","description":"The esbuild plugin to support Go's http.FileServer","archived":false,"fork":false,"pushed_at":"2023-07-09T17:38:13.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-28T09:49:01.724Z","etag":null,"topics":["esbuild-plugin","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/elct9620.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-07-08T06:34:01.000Z","updated_at":"2024-11-20T13:34:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"b71a9252-43e7-4e8c-a02d-d312af6cf05d","html_url":"https://github.com/elct9620/esbuild-fs","commit_stats":null,"previous_names":["elct9620/esbuild-fs"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fesbuild-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fesbuild-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fesbuild-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fesbuild-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elct9620","download_url":"https://codeload.github.com/elct9620/esbuild-fs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052619,"owners_count":20553161,"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":["esbuild-plugin","golang"],"created_at":"2024-11-29T20:12:29.614Z","updated_at":"2025-03-23T03:30:27.378Z","avatar_url":"https://github.com/elct9620.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"ESBuild FS\n===\n[![Test](https://github.com/elct9620/esbuild-fs/actions/workflows/test.yml/badge.svg)](https://github.com/elct9620/esbuild-fs/actions/workflows/test.yml)\n\nThis plugin creates a simple in-memory Key-Value filesystem to track compiled assets to provide `http.FileSystem` support.\n\n\u003e This is not designed for production, use it when development.\n\n## Usage\n\nInstall with `go get`\n\n```bash\ngo get -u github.com/elct9620/esbuild-fs\n```\n\nThe `esbuildfs.Serve()` shortcut is created to make assets handler and SSE (Server Sent Event).\n\n```go\nassets, sse, err := esbuildfs.Server(\n    api.BuildOptions{\n        Outdir: \"static/js\", // required\n        // ...\n    },\n    esbuildfs.WithPrefix(\"assets\"), // Or `http.StripPrefix`\n)\n\n// ...\nmux.Handle(\"/assets/\", assets)\nmux.Handle(\"/esbuild\", sse)\n```\n\nWe can use `html/template` to add the Live Reload script.\n\n```html\n{{ if .LiveReload }}\n\u003cscript\u003e\n    new EventSource('/esbuild').addEventListener('change', () =\u003e location.reload())\n\u003c/script\u003e\n{{ end }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fesbuild-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felct9620%2Fesbuild-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fesbuild-fs/lists"}