{"id":13565501,"url":"https://github.com/angusjf/astro-integration-elm","last_synced_at":"2025-05-10T02:33:09.572Z","repository":{"id":64411743,"uuid":"573908762","full_name":"angusjf/astro-integration-elm","owner":"angusjf","description":"Server side rendering with hydration for Elm","archived":true,"fork":false,"pushed_at":"2024-11-30T15:02:05.000Z","size":698,"stargazers_count":32,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-05T08:02:22.334Z","etag":null,"topics":["astro","elm","ssr"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/astro-integration-elm","language":"JavaScript","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/angusjf.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,"publiccode":null,"codemeta":null}},"created_at":"2022-12-03T20:15:09.000Z","updated_at":"2025-02-17T01:16:01.000Z","dependencies_parsed_at":"2024-11-01T14:00:27.229Z","dependency_job_id":"06d2b0b1-4fd8-4084-8dfe-84ab8d330388","html_url":"https://github.com/angusjf/astro-integration-elm","commit_stats":{"total_commits":57,"total_committers":3,"mean_commits":19.0,"dds":"0.26315789473684215","last_synced_commit":"f6d59d1a679f342cc36de9857794b569cde2be72"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angusjf%2Fastro-integration-elm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angusjf%2Fastro-integration-elm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angusjf%2Fastro-integration-elm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angusjf%2Fastro-integration-elm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angusjf","download_url":"https://codeload.github.com/angusjf/astro-integration-elm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253354489,"owners_count":21895436,"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":["astro","elm","ssr"],"created_at":"2024-08-01T13:01:48.546Z","updated_at":"2025-05-10T02:33:09.216Z","avatar_url":"https://github.com/angusjf.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# astro-integration-elm 🌳\n\nThis **[Astro integration](https://docs.astro.build/en/guides/integrations-guide/)** enables server-side rendering and client-side hydration for your [Elm](https://elm-lang.org/) components.\n\n## Installation\n\n⚠️ To use this integration your project must be using astro version 1.6 or greater.\n\nFirst, once you have [set up your Astro project](https://docs.astro.build/en/getting-started/#start-your-first-project), install the `astro-integration-elm` package:\n\n```sh\nnpm install astro-integration-elm\n```\n\nMost package managers will install associated peer dependencies as well. Still, if you see a \"Cannot find package 'elm'\" (or similar) warning when you start up Astro, you'll need to install Elm:\n\n```sh\nnpm install elm\n```\n\nNow, apply this integration to your `astro.config.*` file using the `integrations` property:\n\n_astro.config.mjs_\n\n```diff\n+ import elm from \"astro-integration-elm\";\n\n  export default defineConfig({\n+    integrations: [elm()],\n  });\n```\n\nFinally, run `elm init` to create an `elm.json`, and change `source-directories` to reflect the directories you plan to put your Elm components in.\n\n```bash\nnpx elm init\n```\n\n_elm.json_\n\n```diff\n    \"source-directories\": [\n+     \"src\"\n-     \"src/components\"\n    ],\n```\n\n(If you're using `git` you should probably also add the `elm-stuff` folder to your `.gitignore`)\n\n## An example Elm component\n\n_src/pages/index.astro_\n\n```jsx\n---\nimport Hello from \"../components/Hello.elm\";\n---\n\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cHello /\u003e from Astro and Elm!\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n_src/components/Hello.elm_\n\n```elm\nmodule Hello exposing (main)\n\nimport Html\n\nmain = Html.text \"Hello world\"\n```\n\nNow start up the dev server...\n\n```\nnpm run astro dev\n```\n\n... and you should see your server side rendered Elm! 🥳\n\n## Next steps\n\n### Learn Astro\n\nTo learn the Astro's concepts, head to the [UI framework documentation](https://docs.astro.build/en/core-concepts/framework-components/). You'll explore:\n\n- 📦 how framework components are loaded,\n- 💧 client-side hydration options, and\n- 🤝 opportunities to mix and nest frameworks together\n\n### Learn Elm\n\nIf you're not already familiar with Elm, a great place to start is the [Official Guide](https://guide.elm-lang.org).\n\n### More about the Elm Astro Integration\n\n➡️ For some more interesting examples of `astro-integration-elm`, see the [guide in the docs](docs/guide.md) or check out the [announcement post on my blog](https://www.angusjf.com/astro-integration-elm).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangusjf%2Fastro-integration-elm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangusjf%2Fastro-integration-elm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangusjf%2Fastro-integration-elm/lists"}