{"id":21224560,"url":"https://github.com/kubilaysalih/electroscope","last_synced_at":"2026-01-04T22:07:24.323Z","repository":{"id":48313047,"uuid":"234182798","full_name":"kubilaysalih/electroscope","owner":"kubilaysalih","description":"⚛️ painless refresh for electron main process","archived":false,"fork":false,"pushed_at":"2023-07-18T20:36:49.000Z","size":228,"stargazers_count":3,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T04:27:01.096Z","etag":null,"topics":["electron","refresh"],"latest_commit_sha":null,"homepage":"","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/kubilaysalih.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2020-01-15T22:05:39.000Z","updated_at":"2023-08-14T06:12:06.000Z","dependencies_parsed_at":"2024-11-15T04:36:06.556Z","dependency_job_id":null,"html_url":"https://github.com/kubilaysalih/electroscope","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"3da5afcad32ff226fd2191ad621c605213b74f8f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubilaysalih%2Felectroscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubilaysalih%2Felectroscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubilaysalih%2Felectroscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubilaysalih%2Felectroscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubilaysalih","download_url":"https://codeload.github.com/kubilaysalih/electroscope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225642423,"owners_count":17501312,"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":["electron","refresh"],"created_at":"2024-11-20T22:58:53.213Z","updated_at":"2026-01-04T22:07:24.252Z","avatar_url":"https://github.com/kubilaysalih.png","language":"JavaScript","readme":"# electroscope\n\u003e painless reload for electron main process\n\nLet the electroscope check the modules according to the entry file you give, and if necessary, refresh the main process and do not touch the renderer! Also, may the stdio be with you.\n\n# Installation\n```\nnpm install --dev electroscope\n\nyarn add --dev electroscope\n```\n\nOf course you can use electroscope as global module.\n\n# Usage\n #### 1) Replace the existing calls to  `electroscope`  in scripts.\n\n```diff\n/* package.json */\n\n\"scripts\": {\n-   \"start\": \"electron main.js\",\n+   \"start\": \"electroscope main.js\"\n}\n```\n\n\n#### 2) Require module in entry file of electron\n\n```js\nconst foo = require('bar')\n...\n\nif(process.env.NODE_ENV === 'development') {\n\trequire('electroscope')\n}\n```\n\n\n\n# Why this module?\n\nI've tried all the other electron-reload stuffs, but there are a few things they all missed. First, the app.relaunch method doesn't work as we expected, at least it wasn't what we imagined in our minds. app.relaunch caused us to lose control of stdio, and we had to do little hacking to partially solve it. I do not like it :/ Secondly, why changes in my rendering process cause an update to main process? Maybe I want to use HMR? Booom! The only change is that it updates both my main process and my renderer process. Okay, it might be a good idea to split the renderer and main files into different folders or use a regex pattern, but I'm too lazy to do that.\n\n# License\n\nMIT © [kubilay salih](https://kubilay.io)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubilaysalih%2Felectroscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubilaysalih%2Felectroscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubilaysalih%2Felectroscope/lists"}