{"id":17055169,"url":"https://github.com/deriegle/adonis-hotwire","last_synced_at":"2025-04-12T17:08:22.316Z","repository":{"id":44608702,"uuid":"375216574","full_name":"deriegle/adonis-hotwire","owner":"deriegle","description":"Adonis package for working with Hotwire.js","archived":false,"fork":false,"pushed_at":"2025-04-12T11:41:05.000Z","size":145,"stargazers_count":3,"open_issues_count":12,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T17:08:16.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/deriegle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":"https://www.buymeacoffee.com/deriegle"}},"created_at":"2021-06-09T03:39:30.000Z","updated_at":"2024-08-18T17:16:46.000Z","dependencies_parsed_at":"2025-02-13T08:31:52.856Z","dependency_job_id":null,"html_url":"https://github.com/deriegle/adonis-hotwire","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deriegle%2Fadonis-hotwire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deriegle%2Fadonis-hotwire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deriegle%2Fadonis-hotwire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deriegle%2Fadonis-hotwire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deriegle","download_url":"https://codeload.github.com/deriegle/adonis-hotwire/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602315,"owners_count":21131616,"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":[],"created_at":"2024-10-14T10:17:30.782Z","updated_at":"2025-04-12T17:08:22.272Z","avatar_url":"https://github.com/deriegle.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/deriegle"],"categories":[],"sub_categories":[],"readme":"# Adonis Hotwire\n\nAdonis v5 package for interacting with [hotwire](https://turbo.hotwire.dev/).\n\n## Installation\n\n```bash\nnpm i adonis-hotwire @hotwired/turbo stimulus\nnode ace configure adonis-hotwire\n```\n\n## Making a Stimulus Controller\n\nThere is an included command for generating new stimulus controllers. The new controller will be generating in the `resources/js/controllers/` folder.\n\n```bash\nnode ace make:stimulus_controller \u003ccontroller_name\u003e\n```\n\n## In your controller\n\nYou'll have access to an additional object in the `HttpContextContract` for interacting with turbo streams.\nThis object will provide methods for `append`, `prepend`, `replace`, `update` and `remove` actions.\n\nYou can read more about their uses in the [Turbo Stream Handbook](https://turbo.hotwire.dev/handbook/streams).\n\nExample:\n\n```typescript\nclass MessagesController {\n  public async create({ request, turboStream }: HttpContextContract) {\n    const { content } = request.body()\n\n    const message = await Message.create({\n      content,\n    })\n\n    turboStream.append('messages', {\n      templatePath: 'messages/show',\n      locals: {\n        message,\n      },\n    })\n  }\n}\n```\n\n## Additional Documentation\nCheck out the `example/` directory in the Github repo for an example of using the `adonis-hotwire` package.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderiegle%2Fadonis-hotwire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderiegle%2Fadonis-hotwire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderiegle%2Fadonis-hotwire/lists"}