{"id":16078992,"url":"https://github.com/joekrump/svelte-rails","last_synced_at":"2025-04-11T08:19:14.644Z","repository":{"id":38818848,"uuid":"422033327","full_name":"joekrump/svelte-rails","owner":"joekrump","description":"This is an experimental app template that allows a view to be composed of any combination of Svelte components and .html.erb","archived":false,"fork":false,"pushed_at":"2023-06-08T18:54:03.000Z","size":2595,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T05:51:12.455Z","etag":null,"topics":["ruby","ruby-on-rails","svelte","tailwind","tailwindcss","vite"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/joekrump.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":"2021-10-28T02:02:19.000Z","updated_at":"2024-07-22T16:40:37.000Z","dependencies_parsed_at":"2024-10-31T03:04:12.773Z","dependency_job_id":"3e926630-9dac-423a-8726-31785024437f","html_url":"https://github.com/joekrump/svelte-rails","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":"joekrump/modern-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joekrump%2Fsvelte-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joekrump%2Fsvelte-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joekrump%2Fsvelte-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joekrump%2Fsvelte-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joekrump","download_url":"https://codeload.github.com/joekrump/svelte-rails/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360781,"owners_count":21090755,"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":["ruby","ruby-on-rails","svelte","tailwind","tailwindcss","vite"],"created_at":"2024-10-09T10:23:34.605Z","updated_at":"2025-04-11T08:19:14.619Z","avatar_url":"https://github.com/joekrump.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte + Rails\n\nThis is a template of an app with a setup that allows Svelte components to be used in combination with ERB templates to render views.\n\nThis also includes:\n\n- Hot module replacement for `.svelte` files\n- Hot reloading for changes to `routes.rb` and Rails view files. See [`vite.config.ts`](https://github.com/joekrump/svelte-rails/blob/b62219c0e71d614b8d5f7c398e47e3efb47244e6/vite.config.ts) for details.\n- A Rails helper to allow for easy addition of `.svelte` components into `.html.erb` templates using `\u003csvelte-*\u003e` syntax. See [`app/frontend/svelte/index.ts`](https://github.com/joekrump/svelte-rails/blob/c08b917c80eacffe38b668bdb156160ffe7718a6/app/frontend/svelte/index.ts) for details.\n- [TailwindCSS for styling](https://tailwindcss.com)\n\n## Dev\n\nYou will find Svelte components in `app/frontend/svelte/`. To add them to a Rails view (`.html.erb` file), see details in [`app/frontend/svelte/index.ts`](https://github.com/joekrump/svelte-rails/blob/c08b917c80eacffe38b668bdb156160ffe7718a6/app/frontend/svelte/index.ts).\n\nExample:\n\nSee `app/views/home/index.html.erb`:\n\n```erb\n\u003csvelte-home data-props=\"\u003c%= @data.to_json %\u003e\"\u003e\u003c/svelte-home\u003e\n```\n### Setup\n\n```bash\nbundle install\nyarn\n```\n\n### Run app:\n```bash\nbundle exec rails s\nbin/vite dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoekrump%2Fsvelte-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoekrump%2Fsvelte-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoekrump%2Fsvelte-rails/lists"}