{"id":18465171,"url":"https://github.com/sleexyz/reloady","last_synced_at":"2025-04-30T22:15:50.045Z","repository":{"id":57352886,"uuid":"119223859","full_name":"sleexyz/reloady","owner":"sleexyz","description":"node code auto reload","archived":false,"fork":false,"pushed_at":"2018-02-01T22:06:09.000Z","size":49,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T10:12:38.986Z","etag":null,"topics":["browser-testing","debugging","hot-reload","livecoding"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sleexyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-28T03:22:55.000Z","updated_at":"2023-07-27T12:03:23.000Z","dependencies_parsed_at":"2022-09-05T13:10:57.115Z","dependency_job_id":null,"html_url":"https://github.com/sleexyz/reloady","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/sleexyz%2Freloady","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleexyz%2Freloady/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleexyz%2Freloady/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleexyz%2Freloady/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sleexyz","download_url":"https://codeload.github.com/sleexyz/reloady/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251582976,"owners_count":21612740,"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":["browser-testing","debugging","hot-reload","livecoding"],"created_at":"2024-11-06T09:12:13.970Z","updated_at":"2025-04-29T20:44:46.085Z","avatar_url":"https://github.com/sleexyz.png","language":"JavaScript","readme":"# Reloady\n[![CircleCI](https://circleci.com/gh/sleexyz/reloady.svg?style=svg)](https://circleci.com/gh/sleexyz/reloady)\n[![npm version](https://img.shields.io/npm/v/reloady.svg?style=flat-square)](https://www.npmjs.com/package/reloady)\n\n\nAutomatically re-execute code when it changes, from anywhere in your code.\n\nGreat for:\n- checkpointing while debugging slow tests (think browser tests)\n- live-coding with node.js\n\n![reloady buddy](https://user-images.githubusercontent.com/1505617/35489842-be91bb66-0468-11e8-88e8-babe130ac3a2.png)\n\n## Usage\n\n```\nyarn add --dev reloady\n```\n\nReloady can be initialized anywhere in your code. Just give it:\n\n1. an absolute path to a module with a function as a default export\n2. an optional argument to call the function with\n\nExample:\n```js\nconst reloady = require(\"reloady\");\n\n(async () =\u003e {\n  const foo = 1;\n  const bar = 2;\n\n  await reloady({\n    path: require.resolve(\"./debug\"),\n    input: { foo, bar }\n  });\n\n})();\n```\n\nReloady returns a promise that never resolves, so you can `await` it as a sort of persistent debugger.\n\n---\n\nNow every time you change `./debug.js`, the module will be re-required and re-invoked with its given arguments.\n\n```js\n// ./debug.js\n\nmodule.exports = async ({ foo, bar }) =\u003e {\n  console.log(foo); // 1\n  await new Promise(resolve =\u003e setTimeout(resolve, 1000));\n  console.log(bar); // 2\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleexyz%2Freloady","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleexyz%2Freloady","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleexyz%2Freloady/lists"}