{"_id":"@electron-builder/electron-download","_rev":"4244781","name":"@electron-builder/electron-download","description":"download electron prebuilt binary zips from github releases","dist-tags":{"latest":"4.2.1"},"maintainers":[{"name":"develar","email":""}],"time":{"modified":"2026-03-29T21:28:03.000Z","created":"2017-04-09T18:21:04.442Z","4.2.1":"2017-04-09T18:36:55.403Z","4.2.0":"2017-04-09T18:21:04.442Z"},"users":{},"author":{"name":"max ogden"},"repository":{"type":"git","url":"git+https://github.com/electron-userland/electron-download.git"},"versions":{"4.2.1":{"name":"@electron-builder/electron-download","version":"4.2.1","description":"download electron prebuilt binary zips from github releases","main":"lib/index.js","bin":{"electron-download":"lib/cli.js"},"scripts":{"lint":"eslint lib test","unit-tests":"tape test/*.js","test":"npm run unit-tests && npm run lint"},"repository":{"type":"git","url":"git+https://github.com/electron-userland/electron-download.git"},"author":{"name":"max ogden"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/electron-userland/electron-download/issues"},"homepage":"https://github.com/electron-userland/electron-download#readme","dependencies":{"debug":"^2.6.3","env-paths":"^1.0.0","fs-extra":"^2.1.2","minimist":"^1.2.0","nugget":"^2.0.1","path-exists":"^3.0.0","rc":"^1.2.1","semver":"^5.3.0","sumchecker":"^2.0.2"},"devDependencies":{"eslint":"^3.18.0","eslint-config-standard":"^7.1.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","mkdirp":"^0.5.1","tape":"^4.6.3","temp":"^0.8.3"},"eslintConfig":{"extends":"standard","parserOptions":{"sourceType":"script"},"rules":{"strict":["error"]}},"keywords":[],"engines":{"node":">= 4.0"},"gitHead":"1714adc5694f02d65ef49891aaf2e5b3081c14bb","_id":"@electron-builder/electron-download@4.2.1","_shasum":"b10b7b077523ae2f6c21dc05658df145d716c223","_from":".","_npmVersion":"4.5.0","_nodeVersion":"7.8.0","_npmUser":{"name":"develar","email":"develar@gmail.com"},"dist":{"shasum":"b10b7b077523ae2f6c21dc05658df145d716c223","size":20268,"noattachment":false,"key":"/@electron-builder/electron-download/-/@electron-builder/electron-download-4.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron-builder/electron-download/download/@electron-builder/electron-download-4.2.1.tgz"},"maintainers":[{"name":"develar","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/electron-download-4.2.1.tgz_1491763014735_0.9285723573993891"},"directories":{},"publish_time":1491763015403,"_hasShrinkwrap":false,"_cnpm_publish_time":1491763015403,"_cnpmcore_publish_time":"2021-12-17T01:15:47.205Z"},"4.2.0":{"name":"@electron-builder/electron-download","version":"4.2.0","description":"download electron prebuilt binary zips from github releases","main":"lib/index.js","bin":{"electron-download":"lib/cli.js"},"scripts":{"lint":"eslint lib test","unit-tests":"tape test/*.js","test":"npm run unit-tests && npm run lint"},"repository":{"type":"git","url":"git+https://github.com/electron-userland/electron-download.git"},"author":{"name":"max ogden"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/electron-userland/electron-download/issues"},"homepage":"https://github.com/electron-userland/electron-download#readme","dependencies":{"debug":"^2.6.3","env-paths":"^1.0.0","fs-extra":"^2.1.2","minimist":"^1.2.0","nugget":"^2.0.1","path-exists":"^3.0.0","rc":"^1.2.1","semver":"^5.3.0","sumchecker":"^2.0.2"},"devDependencies":{"eslint":"^3.18.0","eslint-config-standard":"^7.1.0","eslint-plugin-promise":"^3.5.0","eslint-plugin-standard":"^2.1.1","mkdirp":"^0.5.1","tape":"^4.6.3","temp":"^0.8.3"},"eslintConfig":{"extends":"standard","parserOptions":{"sourceType":"script"},"rules":{"strict":["error"]}},"keywords":[],"engines":{"node":">= 4.0"},"gitHead":"1714adc5694f02d65ef49891aaf2e5b3081c14bb","_id":"@electron-builder/electron-download@4.2.0","_shasum":"329562f92230c8f1a435ed1d16885d5cfe086817","_from":".","_npmVersion":"4.5.0","_nodeVersion":"7.8.0","_npmUser":{"name":"develar","email":"develar@gmail.com"},"dist":{"shasum":"329562f92230c8f1a435ed1d16885d5cfe086817","size":20309,"noattachment":false,"key":"/@electron-builder/electron-download/-/@electron-builder/electron-download-4.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@electron-builder/electron-download/download/@electron-builder/electron-download-4.2.0.tgz"},"maintainers":[{"name":"develar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/electron-download-4.2.0.tgz_1491762062604_0.3567276760004461"},"directories":{},"publish_time":1491762064442,"_hasShrinkwrap":false,"_cnpm_publish_time":1491762064442,"_cnpmcore_publish_time":"2021-12-17T01:15:47.508Z"}},"readme":"# electron-download\n\n[![Travis Build Status](https://travis-ci.org/electron-userland/electron-download.svg?branch=master)](https://travis-ci.org/electron-userland/electron-download)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/fmfbjmrs42d7bctn/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-download/branch/master)\n\n[![NPM](https://nodei.co/npm/electron-download.png?downloads=true)](https://www.npmjs.com/package/electron-download)\n\nDownloads an Electron release zip from GitHub.\n\nUsed by [electron-prebuilt](https://npmjs.org/electron-prebuilt) and [electron-packager](https://npmjs.org/electron-packager)\n\n### Usage\n\n**Note: Requires Node >= 4.0 to run.**\n\n```shell\n$ npm install --global electron-download\n$ electron-download --version=0.31.1\n```\n\n```javascript\nconst download = require('electron-download')\n\ndownload({\n  version: '0.25.1',\n  arch: 'ia32',\n  platform: 'win32',\n  cache: './zips'\n}, function (err, zipPath) {\n  // zipPath will be the path of the zip that it downloaded.\n  // If the zip was already cached it will skip\n  // downloading and call the cb with the cached zip path.\n  // If it wasn't cached it will download the zip and save\n  // it in the cache path.\n})\n```\n\nIf you don't specify `arch` or `platform` args it will use the built-in `os` module to get the values from the current OS. Specifying `version` is mandatory. If there is a `SHASUMS256.txt` file available for the `version`, the file downloaded will be validated against its checksum to ensure that it was downloaded without errors.\n\nYou can also use `electron-download` to download the `chromedriver`, `ffmpeg`,\n`mksnapshot`, and symbols assets for a specific Electron release. This can be\nconfigured by setting the `chromedriver`, `ffmpeg`, `mksnapshot`, or\n`symbols` property to `true` in the specified options object. Only one of\nthese options may be specified per download call.\n\nYou can force a re-download of the asset and the `SHASUM` file by setting the\n`force` option to `true`.\n\nIf you would like to override the mirror location, three options are available. The mirror URL is composed as `url = ELECTRON_MIRROR + ELECTRON_CUSTOM_DIR + '/' + ELECTRON_CUSTOM_FILENAME`.\n\nYou can set the `ELECTRON_MIRROR` or [`NPM_CONFIG_ELECTRON_MIRROR`](https://docs.npmjs.com/misc/config#environment-variables) environment variable or `mirror` opt variable to use a custom base URL for grabbing Electron zips. The same pattern applies to `ELECTRON_CUSTOM_DIR` and `ELECTRON_CUSTOM_FILENAME`:\n\n```plain\n## Electron Mirror of China\nELECTRON_MIRROR=\"https://npm.taobao.org/mirrors/electron/\"\n\n## or for a local mirror\nELECTRON_MIRROR=\"https://10.1.2.105/\"\nELECTRON_CUSTOM_DIR=\"our/internal/filePath\"\n```\n\nYou can set ELECTRON_MIRROR in `.npmrc` as well, using the lowercase name:\n\n```plain\nelectron_mirror=https://10.1.2.105/\n```\n\n### Cache location\nThe location of the cache depends on the operating system, the defaults are:\n- Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`\n- MacOS: `~/Library/Caches/electron/`\n- Windows: `$LOCALAPPDATA/electron/Cache` or `~/AppData/Local/electron/Cache/`\n\n","_attachments":{},"homepage":"https://github.com/electron-userland/electron-download#readme","bugs":{"url":"https://github.com/electron-userland/electron-download/issues"},"license":"BSD-3-Clause"}