{"id":15894899,"url":"https://github.com/clayrisser/hmr-client","last_synced_at":"2025-08-14T09:31:40.486Z","repository":{"id":57264688,"uuid":"150804343","full_name":"clayrisser/hmr-client","owner":"clayrisser","description":"A client for communicating with hot module replacement (HMR)","archived":false,"fork":false,"pushed_at":"2023-07-12T12:27:43.000Z","size":1708,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-08T20:53:24.610Z","etag":null,"topics":["client","hmr","hmr-client","hot-module-replacement"],"latest_commit_sha":null,"homepage":null,"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/clayrisser.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2018-09-28T23:30:35.000Z","updated_at":"2023-07-11T05:56:54.000Z","dependencies_parsed_at":"2024-10-28T04:01:54.684Z","dependency_job_id":"3750a1ea-3c12-4b75-8bfc-8ec776ba2937","html_url":"https://github.com/clayrisser/hmr-client","commit_stats":null,"previous_names":["codejamninja/hmr-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fhmr-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fhmr-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fhmr-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fhmr-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clayrisser","download_url":"https://codeload.github.com/clayrisser/hmr-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229816009,"owners_count":18128512,"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":["client","hmr","hmr-client","hot-module-replacement"],"created_at":"2024-10-06T08:42:29.462Z","updated_at":"2024-12-15T12:07:20.266Z","avatar_url":"https://github.com/clayrisser.png","language":"JavaScript","funding_links":["https://liberapay.com/codejamninja/donate"],"categories":[],"sub_categories":[],"readme":"# hmr-client\n\n[![GitHub stars](https://img.shields.io/github/stars/codejamninja/hmr-client.svg?style=social\u0026label=Stars)](https://github.com/codejamninja/hmr-client)\n\n\u003e A client for communicating with hot module replacement (HMR)\n\n![](assets/hmr-client.png)\n\nPlease ★ this repo if you found it useful ★ ★ ★\n\n\n## Features\n\n* listen to connected event\n* listen to close event\n* listen to hash event\n* listen to still-ok event\n* listen to content-changed event\n* listen to warnings event\n* listen to errors event\n* listen to ok event\n\n\n## Installation\n\n```sh\nnpm install --save hmr-client\n```\n\n\n## Dependencies\n\n* [NodeJS](https://nodejs.org)\n* [Hot Module Replacement (HMR)](https://webpack.js.org/concepts/hot-module-replacement)\n\n\n## Usage\n\n```js\nimport HRMClient from 'hmr-client';\n\nconst client = new HMRClient({ port: 3000 });\nclient.onConnected = () =\u003e {\n  console.log('connected');\n};\nclient.onHash = message =\u003e {\n  console.log('hash', message.data)\n};\nclient.onStillOk = () =\u003e {\n  console.log('still-ok');\n};\nclient.onOk = () =\u003e {\n  console.log('ok');\n};\nclient.onContentChanged = () =\u003e {\n  console.log('content-changed');\n};\nclient.onWarnings = message =\u003e {\n  console.log('warnings', message);\n};\nclient.onErrors = message =\u003e {\n  console.log('errors', message);\n};\nclient.onClose = () =\u003e {\n  console.log('close');\n  console.log(\n    'The development server has disconnected.\\n' +\n      'Refresh the page if necessary.'\n  );\n};\n```\n\n\n## Support\n\nSubmit an [issue](https://github.com/codejamninja/hmr-client/issues/new)\n\n\n## Screenshots\n\n[Contribute](https://github.com/codejamninja/hmr-client/blob/master/CONTRIBUTING.md) a screenshot\n\n\n## Contributing\n\nReview the [guidelines for contributing](https://github.com/codejamninja/hmr-client/blob/master/CONTRIBUTING.md)\n\n\n## License\n\n[MIT License](https://github.com/codejamninja/hmr-client/blob/master/LICENSE)\n\n[Jam Risser](https://codejam.ninja) © 2018\n\n\n## Changelog\n\nReview the [changelog](https://github.com/codejamninja/hmr-client/blob/master/CHANGELOG.md)\n\n\n## Credits\n\n* [Jam Risser](https://codejam.ninja) - Author\n\n\n## Support on Liberapay\n\nA ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.\n\n[Add some fuel](https://liberapay.com/codejamninja/donate) if you'd like to keep me going!\n\n[![Liberapay receiving](https://img.shields.io/liberapay/receives/codejamninja.svg?style=flat-square)](https://liberapay.com/codejamninja/donate)\n[![Liberapay patrons](https://img.shields.io/liberapay/patrons/codejamninja.svg?style=flat-square)](https://liberapay.com/codejamninja/donate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Fhmr-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclayrisser%2Fhmr-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Fhmr-client/lists"}