{"id":17919344,"url":"https://github.com/zombiezen/esbuild-plugin-stimulus","last_synced_at":"2025-03-24T00:31:36.620Z","repository":{"id":42037146,"uuid":"348587091","full_name":"zombiezen/esbuild-plugin-stimulus","owner":"zombiezen","description":"esbuild plugin for automatically loading Stimulus controllers from a folder","archived":false,"fork":false,"pushed_at":"2023-06-19T02:56:56.000Z","size":39,"stargazers_count":28,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T19:53:47.968Z","etag":null,"topics":["esbuild","hotwire","javascript","plugin","stimulus"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/esbuild-plugin-stimulus","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zombiezen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"zombiezen"}},"created_at":"2021-03-17T05:13:01.000Z","updated_at":"2025-03-10T08:44:34.000Z","dependencies_parsed_at":"2024-06-19T04:08:20.423Z","dependency_job_id":"3f0889e4-f22a-4e7b-a41c-a042d90bcfce","html_url":"https://github.com/zombiezen/esbuild-plugin-stimulus","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":"0.16216216216216217","last_synced_commit":"3578f4b2cc22c4625d6256da90d2c9391649a953"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fesbuild-plugin-stimulus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fesbuild-plugin-stimulus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fesbuild-plugin-stimulus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zombiezen%2Fesbuild-plugin-stimulus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zombiezen","download_url":"https://codeload.github.com/zombiezen/esbuild-plugin-stimulus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191117,"owners_count":20575244,"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":["esbuild","hotwire","javascript","plugin","stimulus"],"created_at":"2024-10-28T20:16:14.451Z","updated_at":"2025-03-24T00:31:36.311Z","avatar_url":"https://github.com/zombiezen.png","language":"TypeScript","funding_links":["https://github.com/sponsors/zombiezen"],"categories":[],"sub_categories":[],"readme":"# esbuild-plugin-stimulus\n\n[esbuild][] plugin for automatically loading [Stimulus][] controllers from a\nfolder. For example, if you create `controllers/users/list_item_controller.js`,\nthen your Stimulus controller will be available as `users--list-item`.\n\n[esbuild]: https://esbuild.github.io/\n[Stimulus]: https://stimulus.hotwire.dev/\n\n## Install\n\n```shell\nnpm install --save-dev esbuild-plugin-stimulus\n```\n\n## Usage\n\nIn your [esbuild script][]:\n\n```javascript\n// build.js\n\nconst esbuild = require('esbuild');\nconst { stimulusPlugin } = require('esbuild-plugin-stimulus');\n\nesbuild.build({\n  plugins: [stimulusPlugin()],\n  // ...\n}).catch(() =\u003e process.exit(1));\n```\n\nAnd in your application (similar to [using webpack][]):\n\n```javascript\n// app.js\n\nimport { Application } from 'stimulus';\nimport { definitions } from 'stimulus:./controllers';\n\nconst app = Application.start();\napp.load(definitions);\n```\n\nIf you are using TypeScript, add a [declaration file][] like the following to\nyour project to provide type information for `stimulus:` imports:\n\n```typescript\n// esbuild-plugin-stimulus.d.ts\n\ndeclare module 'stimulus:*' {\n  import type { Definition } from '@hotwired/stimulus';\n  export const definitions: Definition[];\n}\n```\n\n[declaration file]: https://www.typescriptlang.org/docs/handbook/modules.html#working-with-other-javascript-libraries\n[esbuild script]: https://esbuild.github.io/getting-started/#build-scripts\n[using webpack]: https://stimulus.hotwire.dev/handbook/installing#using-webpack-helpers\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzombiezen%2Fesbuild-plugin-stimulus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzombiezen%2Fesbuild-plugin-stimulus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzombiezen%2Fesbuild-plugin-stimulus/lists"}