{"id":22160595,"url":"https://github.com/rozek/automerge-bundle","last_synced_at":"2026-04-28T20:36:23.073Z","repository":{"id":227505145,"uuid":"771615730","full_name":"rozek/automerge-bundle","owner":"rozek","description":"an automerge bundle that can be used directly in the browser (e.g., for no-build environments)","archived":false,"fork":false,"pushed_at":"2024-03-20T10:27:33.000Z","size":1554,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T20:30:23.338Z","etag":null,"topics":["automerge","broadcastchannelnetworkadapter","browserwebsocketclientadapter","crdt","indexeddbstorageadapter","next","repo"],"latest_commit_sha":null,"homepage":"","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/rozek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-03-13T16:16:57.000Z","updated_at":"2024-03-25T09:35:43.000Z","dependencies_parsed_at":"2024-03-20T11:53:00.696Z","dependency_job_id":null,"html_url":"https://github.com/rozek/automerge-bundle","commit_stats":null,"previous_names":["rozek/automerge-bundle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fautomerge-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fautomerge-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fautomerge-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rozek%2Fautomerge-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rozek","download_url":"https://codeload.github.com/rozek/automerge-bundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294803,"owners_count":20591923,"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":["automerge","broadcastchannelnetworkadapter","browserwebsocketclientadapter","crdt","indexeddbstorageadapter","next","repo"],"created_at":"2024-12-02T04:08:55.917Z","updated_at":"2026-04-28T20:36:18.043Z","avatar_url":"https://github.com/rozek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# automerge-bundle #\n\nan automerge bundle that can be used directly in the browser (e.g., for no-build environments like REPLs or similar)\n([live demo](https://rozek.de/automerge/sharedTextValue.html))\n\n[automerge](https://github.com/automerge/automerge) uses [WASM](https://webassembly.org/) under the hood and can therefore not directly be `import`ed into a browser - you will have to use a bundler (such as [Vite](https://vitejs.dev/)) that brings your web application into a format that can be loaded into a browser.\n\nOr, alternatively, you just load the `automerge-bundle` from this repository using a simple `\u003cscript/\u003e` element, wait for `automerge` to become available (because it has to be loaded as a JavaScript module) and then use it in your code:\n\n```html\n\u003cscript type=\"module\" src=\"https://rozek.github.io/automerge-bundle/dist/automerge-bundle.js\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\n  if (window.automerge == null) {\n    document.addEventListener('automerge',runApplication)\n  } else {\n    runApplication()\n  }\n\n  function runApplication () {\n    const {\n      next, isValidAutomergeUrl, Repo,\n      IndexedDBStorageAdapter, BrowserWebSocketClientAdapter, BroadcastChannelNetworkAdapter\n    } = window.automerge\n\n// ....insert your automerge code here\n  }\n\u003c/script\u003e\n```\n\n`automerge-bundle` creates a global called `automerge` with the following contents\n\n* `next` - imported from `@automerge/automerge`\n* `isValidAutomergeUrl` and `Repo` - imported from `@automerge/automerge-repo`\n* `IndexedDBStorageAdapter` - imported from `@automerge/automerge-repo-storage-indexeddb`\n* `BrowserWebSocketClientAdapter` - imported from `@automerge/automerge-repo-network-websocket`\n* `BroadcastChannelNetworkAdapter` - imported from `@automerge/automerge-repo-network-broadcastchannel`\n\nAs a consequence, instead of\n\n`  import { next } from \"@automerge/automerge\"`\n\nyou now write\n\n`  const { next } = window.automerge`\n\nor similar - as soon as `automerge` has become available.\n\n## Build Instructions ##\n\nYou may easily build this package yourself.\n\nJust install [NPM](https://docs.npmjs.com/) according to the instructions for your platform and follow these steps:\n\n1. either clone this repository using [git](https://git-scm.com/) or [download a ZIP archive](https://github.com/rozek/automerge-bundle/archive/refs/heads/main.zip) with its contents to your disk and unpack it there \n2. open a shell and navigate to the root directory of this repository\n3. run `npm install` in order to install the complete build environment\n4. execute `npm run build` to create a new build\n\n## License ##\n\n[MIT License](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozek%2Fautomerge-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frozek%2Fautomerge-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frozek%2Fautomerge-bundle/lists"}