{"id":15059358,"url":"https://github.com/marc136/split-elm-bundle","last_synced_at":"2026-01-22T20:10:08.719Z","repository":{"id":225464319,"uuid":"764828288","full_name":"marc136/split-elm-bundle","owner":"marc136","description":"Split the bundled JS code of multiple Elm programs into one .mjs file per program","archived":false,"fork":false,"pushed_at":"2024-03-02T07:22:09.000Z","size":235,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-18T22:47:28.064Z","etag":null,"topics":["bundle-splitting","elm"],"latest_commit_sha":null,"homepage":"https://marc-walter.info/posts/2024-03-02_elm-bundle-splitting","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marc136.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-28T19:34:27.000Z","updated_at":"2025-07-12T02:14:32.000Z","dependencies_parsed_at":"2024-03-02T09:49:58.008Z","dependency_job_id":null,"html_url":"https://github.com/marc136/split-elm-bundle","commit_stats":null,"previous_names":["marc136/split-elm-bundle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marc136/split-elm-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc136%2Fsplit-elm-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc136%2Fsplit-elm-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc136%2Fsplit-elm-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc136%2Fsplit-elm-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marc136","download_url":"https://codeload.github.com/marc136/split-elm-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marc136%2Fsplit-elm-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bundle-splitting","elm"],"created_at":"2024-09-24T22:42:19.531Z","updated_at":"2026-01-22T20:10:08.702Z","avatar_url":"https://github.com/marc136.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a small command-line utility to split JavaScript bundles that the [Elm compiler](https://elm-lang.org) created into multiple ES modules.  \n\nSee it in action [on this page with example programs](https://marc-walter.info/posts/2024-03-02_elm-bundle-splitting/examples/).\n\nCopyright Marc Walter, 2024, licensed under the free [EUPL-1.2](https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12). If you have other requirements, let's talk.\n\n## Usage\n\n```sh\n# Compile multiple Elm programs into one bundle\nelm make --optimize --output=examples.js src/Clock.elm src/TextField.elm src/Quotes.elm\n\n# split the bundle\nnpx split-elm-bundle examples.js\n```\n\nAnd then you can import a program e.g. like this:\n\n```html\n\u003cmain id=\"elm\"\u003e\u003c/main\u003e\n\u003cscript type=\"module\"\u003e\n  import { Clock } from './examples.Clock.mjs';\n  const app = Clock.init({ node: document.getElementById('elm') });\n\u003c/script\u003e \n```\n\nSee the [examples directory](https://github.com/marc136/split-elm-bundle/tree/main/examples/elm-lang-website-examples) for more information.\n\n\n## CLI commands\n\n```\nUsage:\nsplit-elm-bundle \u003coptions\u003e \u003cpath/to/bundle.js\u003e\n\nWith \u003coptions\u003e one of\n`--report=stdout` (default) will print log messages\n`--report=json` will not print immediate logs, but only one JSON report in the end\n`--dry-run` disables writing files to disk\n```\n\n### Example JSON report\n\nFrom running `split-elm-bundle.mjs examples/elm-lang-website-examples/www/examples.js --report=json --dry-run`\n\n```json\n{\n  \"result\": \"split-programs-one-shared\",\n  \"input\": {\n    \"file\": \"examples/elm-lang-website-examples/www/examples.js\",\n    \"sizes\": { \"raw\": 253622, \"gzip\": 53453 }\n  },\n  \"programs\": [ \"Animation\", \"TextField\", \"Quotes\", \"Mouse\", \"Cube\", \"Clock\" ],\n  \"output\": {\n    \"shared\": {\n      \"file\": \"examples/elm-lang-website-examples/www/examples.shared.mjs\",\n      \"sizes\": { \"raw\": 117044, \"gzip\": 24391 }\n    },\n    \"programs\": [\n      {\n        \"file\": \"examples/elm-lang-website-examples/www/examples.Animation.mjs\",\n        \"sizes\": { \"raw\": 7135, \"gzip\": 1514 }\n      },\n      {\n        \"file\": \"examples/elm-lang-website-examples/www/examples.TextField.mjs\",\n        \"sizes\": { \"raw\": 3783, \"gzip\": 1155 }\n      },\n      {\n        \"file\": \"examples/elm-lang-website-examples/www/examples.Quotes.mjs\",\n        \"sizes\": { \"raw\": 15273, \"gzip\": 3661 }\n      },\n      {\n        \"file\": \"examples/elm-lang-website-examples/www/examples.Mouse.mjs\",\n        \"sizes\": { \"raw\": 11375, \"gzip\": 2131 }\n      },\n      {\n        \"file\": \"examples/elm-lang-website-examples/www/examples.Cube.mjs\",\n        \"sizes\": { \"raw\": 40021, \"gzip\": 8833 }\n      },\n      {\n        \"file\": \"examples/elm-lang-website-examples/www/examples.Clock.mjs\",\n        \"sizes\": { \"raw\": 6791, \"gzip\": 1652 }\n      }\n    ]\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarc136%2Fsplit-elm-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarc136%2Fsplit-elm-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarc136%2Fsplit-elm-bundle/lists"}