{"id":18224917,"url":"https://github.com/iamsebastiandev/rollup-plugin-rld","last_synced_at":"2025-04-08T03:45:15.123Z","repository":{"id":65423186,"uuid":"551826862","full_name":"IamSebastianDev/rollup-plugin-rld","owner":"IamSebastianDev","description":"Rollup plugin to inject a livereload script into your bundle","archived":false,"fork":false,"pushed_at":"2024-04-29T11:06:25.000Z","size":1324,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-29T12:28:03.463Z","etag":null,"topics":["livereload","rollup","rollup-plugin","rollupjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/IamSebastianDev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license.md","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":"2022-10-15T07:05:48.000Z","updated_at":"2024-04-29T12:28:07.844Z","dependencies_parsed_at":"2023-02-08T10:02:20.686Z","dependency_job_id":"e78a4ac1-8921-4433-b212-cdd05bf5870e","html_url":"https://github.com/IamSebastianDev/rollup-plugin-rld","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":"0.44999999999999996","last_synced_commit":"7906c0e7794c7e7523fb9382466e59cffe43f47e"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2Frollup-plugin-rld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2Frollup-plugin-rld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2Frollup-plugin-rld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2Frollup-plugin-rld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IamSebastianDev","download_url":"https://codeload.github.com/IamSebastianDev/rollup-plugin-rld/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773744,"owners_count":20993633,"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":["livereload","rollup","rollup-plugin","rollupjs"],"created_at":"2024-11-04T02:05:19.340Z","updated_at":"2025-04-08T03:45:15.083Z","avatar_url":"https://github.com/IamSebastianDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- @format --\u003e\n\n# Rollup-Plugin-Rld\n\n[![Npm package version](https://badgen.net/npm/v/rollup-plugin-rld)](https://www.npmjs.com/package/rollup-plugin-rld) [![Npm package total downloads](https://badgen.net/npm/dt/rollup-plugin-rld)](https://npmjs.com/package/rollup-plugin-rld) [![Npm package license](https://badgen.net/npm/license/rollup-plugin-rld)](https://npmjs.com/package/rollup-plugin-rld)\n[![Github tag](https://badgen.net/github/tag/iamsebastiandev/rollup-plugin-rld)](https://github.com/iamsebastiandev/rollup-plugin-rld/tags)\n\nA [Rollup](https://rollupjs.org/guide/en/) plugin to reload your webpage when the created bundle is regenerated.\n\n## Overview\n\nThe Plugin will inject a bootstrapping script into your bundle when Rollup is running watch mode. The script itself will inject a reloading script that listens to a event sent by the created server when Rollup bundles the code.\n\n## Requirements\n\nThe Plugin was tested with Rollup v3.2.0+, but should run with earlier versions as well. The Plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+).\n\n## Installing\n\nUsing npm or yarn\n\n```bash\nnpm install rollup-plugin-rld -D\n#or\nyarn add rollup-plugin-rld -D\n```\n\n## Usage\n\nIf you have not already created a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files), do so like shown below. Include the plugin in the `plugins` property.\n\n```js\nimport { rld } from 'rollup-plugin-rld';\n\nexport default {\n    input: '/src/index.js',\n    output: {\n        file: '/dist/bundle.js',\n        format: 'iife',\n    },\n    plugins: [\n        // The initialization object is optional.\n        rld({\n            port: 31415,\n            host: 'localhost',\n            url: 'rld',\n        }),\n    ],\n};\n```\n\n## Options\n\n### `port`\n\nType: `number`  \nDefault: `31415`\n\nThe port the plugin will use to listen and dispatch requests on. If your plugin throws an `EADDRINUSE` error, you can change the property to choose a port not yet used. This can also be useful when you use multiple instances of the plugin.\n\n### `host`\n\nType: `string`  \nDefault: `localhost`\n\nThe hostname the server will use to listen to.\n\n### `url`\n\nType: `string`  \nDefault: `/rld`\n\nThe url the server will expose. The reload script will use the url to connect to the reload server. The url can be given with or without leading slash.\n\n### `attributes`\n\nType: `Record\u003cstring, string\u003e`  \nDefault: `{}`\n\nAttributes is a object that can be used to pass attributes to the created script tag. This can be useful when needing to set attributes like `nonce`, `referrerpolicy` or `crossorigin`.\n\n### `log`\n\nType: `boolean`  \nDefault: `false`\n\nA Boolean flag indicating if a log entry should be created inside the browser when a reload occurs.\n\n## Contributing\n\nIf you would like to contribute, take a look at the [contribution guide](./contributing.md).\n\n## License\n\nThe plugin is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsebastiandev%2Frollup-plugin-rld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamsebastiandev%2Frollup-plugin-rld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsebastiandev%2Frollup-plugin-rld/lists"}