{"id":18670018,"url":"https://github.com/blahah/electron-sane-cachepath","last_synced_at":"2025-11-06T18:30:34.632Z","repository":{"id":66275919,"uuid":"96637623","full_name":"blahah/electron-sane-cachepath","owner":"blahah","description":"set the electron cache path to a sane default for the current OS","archived":false,"fork":false,"pushed_at":"2017-07-08T18:52:49.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T19:13:32.181Z","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":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blahah.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":"2017-07-08T18:44:31.000Z","updated_at":"2017-07-08T18:52:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"143247f0-8f1e-4582-93b2-163210f21530","html_url":"https://github.com/blahah/electron-sane-cachepath","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/blahah%2Felectron-sane-cachepath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Felectron-sane-cachepath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Felectron-sane-cachepath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Felectron-sane-cachepath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blahah","download_url":"https://codeload.github.com/blahah/electron-sane-cachepath/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239500986,"owners_count":19649370,"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":"2024-11-07T08:49:33.790Z","updated_at":"2025-02-18T15:50:13.721Z","avatar_url":"https://github.com/blahah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eelectron-sane-cachepath\u003c/h1\u003e\n  \u003ch2\u003eset the electron cache path to a sane default for the current OS\u003c/h2\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://npmjs.com/packages/electron-sane-cachepath\" alt=\"npm package\"\u003e\n      \u003cimg src=\"https://img.shields.io/npm/v/electron-sane-cachepath.svg?style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/blahah/electron-sane-cachepath/blob/master/LICENSE\" alt=\"CC0 public domain\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/license-CC0-ff69b4.svg?style=flat-square\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\nSets the `electron` and `chromium` app base cache paths to sane defaults:\n\n- `macOS`: `~/Library/Caches`\n- `windows`: `process.env.APPDATA`\n- `linux`: `process.env.XDG_CACHE_HOME` or `~/.cache`\n\n*note: the `cache` path is [now undocumented](https://github.com/electron/electron/commit/3d4318e15e757cf26377637ee1240d5b87cde39c) in `electron`, but it works as of electron `1.7.2`*\n\nThis module resolves the problem described in [this issue](https://github.com/electron/electron/issues/8124)\n\n## Install\n\n```\nnpm install --save electron-sane-cachepath\n```\n\n## Usage\n\nJust pass your electron `app` to the module's exported function **before app emits 'ready'**.\n\n``` js\nconst { app } = require('electron')\nrequire('electron-sane-cachepath')(app)\n```\n\nAn error will be thrown if:\n\n- the `app` argument is missing\n- the module is loaded in the renderer\n- it is required on a platform other than `macOS`, `windows` or `linux`\n\n## License\n\nTo the extent possible by law, we transfer any rights we have in this code to the public domain. Specifically, we do so using the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).\n\nYou can do whatever you want with this code. No need to credit us, link to us, include any license, or anything else. But if you want to do those things, you're free to do that too.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Felectron-sane-cachepath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblahah%2Felectron-sane-cachepath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Felectron-sane-cachepath/lists"}