{"id":28736182,"url":"https://github.com/foxbenjaminfox/vue-oldstyle-events","last_synced_at":"2025-06-16T01:05:58.321Z","repository":{"id":57396494,"uuid":"82175686","full_name":"foxbenjaminfox/vue-oldstyle-events","owner":"foxbenjaminfox","description":"Use old-style (Vue 1.0) event dispatch in Vue 2","archived":false,"fork":false,"pushed_at":"2019-04-29T21:30:26.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T09:10:15.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxbenjaminfox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-16T11:55:26.000Z","updated_at":"2019-04-29T21:30:28.000Z","dependencies_parsed_at":"2022-08-27T11:11:34.558Z","dependency_job_id":null,"html_url":"https://github.com/foxbenjaminfox/vue-oldstyle-events","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/foxbenjaminfox/vue-oldstyle-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fvue-oldstyle-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fvue-oldstyle-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fvue-oldstyle-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fvue-oldstyle-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxbenjaminfox","download_url":"https://codeload.github.com/foxbenjaminfox/vue-oldstyle-events/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fvue-oldstyle-events/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260079419,"owners_count":22955700,"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":"2025-06-16T01:05:54.166Z","updated_at":"2025-06-16T01:05:58.310Z","avatar_url":"https://github.com/foxbenjaminfox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbig\u003e\u003ch1 align=\"center\"\u003evue-oldstyle-events\u003c/h1\u003e\u003c/big\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.org/package/vue-oldstyle-events\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/vue-oldstyle-events.svg?style=flat-square\"\n         alt=\"NPM Version\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://coveralls.io/r/foxbenjaminfox/vue-oldstyle-events\"\u003e\n    \u003cimg src=\"https://img.shields.io/coveralls/foxbenjaminfox/vue-oldstyle-events.svg?style=flat-square\"\n         alt=\"Coverage Status\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://travis-ci.org/foxbenjaminfox/vue-oldstyle-events\"\u003e\n    \u003cimg src=\"https://img.shields.io/travis/foxbenjaminfox/vue-oldstyle-events.svg?style=flat-square\"\n         alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://npmjs.org/package/vue-oldstyle-events\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/dm/vue-oldstyle-events.svg?style=flat-square\"\n         alt=\"Downloads\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://david-dm.org/foxbenjaminfox/vue-oldstyle-events.svg\"\u003e\n    \u003cimg src=\"https://david-dm.org/foxbenjaminfox/vue-oldstyle-events.svg?style=flat-square\"\n         alt=\"Dependency Status\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/foxbenjaminfox/vue-oldstyle-events/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/vue-oldstyle-events.svg?style=flat-square\"\n         alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThe biggest blocker to upgrading to Vue 2 is the fact that Vue 2 does not support\nVue 1.0's `$broadcast` and`$dispatch` methods, and Vue 2 doesn't come with a drop-in\nreplacement for them. This package is that replacement.\n\nIt is important to remember that there is a good reason that Vue 2 dropped these methods.\nTo quote the upgrade guide:\n\n\u003e The problem is event flows that depend on a component's tree structure can be hard to\n\u003e reason about and very brittle when the tree becomes large. It simply doesn't scale well\n\u003e and we don't want to set you up for pain later. $dispatch and $broadcast also do not solve\n\u003e communication between sibling components.\n\nAll this is true. But that doesn't solve the problem of legacy codebases which already have\na serious amount of functionality implemented this way. It's a shame for this one thing to \nblock you from upgrading to the newest version of Vue.\n\n## Install\n\n````sh\nnpm install --save vue-oldstyle-events\n````\n\n## Usage\n\nJust do:\n\n````js\nimport OldstyleEvents from 'vue-oldstyle-events'\n\nVue.use(OldstyleEvents)\n````\n\nNow `$broadcast` and `$dispatch` work just [like they did in Vue 1.0](http://v1.vuejs.org/api/#vm-dispatch). You may also register an\nevents object on your Vue instance, again just [like you could in Vue 1.0](http://v1.vuejs.org/api/#events).\n\nOnce again, using this in a new project is discouraged. Use an [event hub](https://vuejs.org/v2/guide/migration.html#dispatch-and-broadcast-replaced) or [vuex](https://github.com/vuejs/vuex) instead.\n\nBut if, like me, you have a codebase that because of this feature is still stuck on Vue 1,\nthen this plugin can help you upgrade to Vue 2 without rewriting all of your event-based logic.\n\n## License\n\nMIT © [Benjamin Fox](http://github.com/foxbenjaminfox)\n\n[npm-url]: https://npmjs.org/package/vue-oldstyle-events\n[npm-image]: https://img.shields.io/npm/v/vue-oldstyle-events.svg?style=flat-square\n\n[travis-url]: https://travis-ci.org/foxbenjaminfox/vue-oldstyle-events\n[travis-image]: https://img.shields.io/travis/foxbenjaminfox/vue-oldstyle-events.svg?style=flat-square\n\n[depstat-url]: https://david-dm.org/foxbenjaminfox/vue-oldstyle-events\n[depstat-image]: https://david-dm.org/foxbenjaminfox/vue-oldstyle-events.svg?style=flat-square\n\n[download-badge]: http://img.shields.io/npm/dm/vue-oldstyle-events.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxbenjaminfox%2Fvue-oldstyle-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxbenjaminfox%2Fvue-oldstyle-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxbenjaminfox%2Fvue-oldstyle-events/lists"}