npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@electron-builder/electron-download

v4.2.1

Published

download electron prebuilt binary zips from github releases

Downloads

16

Readme

electron-download

Travis Build Status AppVeyor Build Status

NPM

Downloads an Electron release zip from GitHub.

Used by electron-prebuilt and electron-packager

Usage

Note: Requires Node >= 4.0 to run.

$ npm install --global electron-download
$ electron-download --version=0.31.1
const download = require('electron-download')

download({
  version: '0.25.1',
  arch: 'ia32',
  platform: 'win32',
  cache: './zips'
}, function (err, zipPath) {
  // zipPath will be the path of the zip that it downloaded.
  // If the zip was already cached it will skip
  // downloading and call the cb with the cached zip path.
  // If it wasn't cached it will download the zip and save
  // it in the cache path.
})

If 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.

You can also use electron-download to download the chromedriver, ffmpeg, mksnapshot, and symbols assets for a specific Electron release. This can be configured by setting the chromedriver, ffmpeg, mksnapshot, or symbols property to true in the specified options object. Only one of these options may be specified per download call.

You can force a re-download of the asset and the SHASUM file by setting the force option to true.

If 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.

You can set the ELECTRON_MIRROR or NPM_CONFIG_ELECTRON_MIRROR 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:

## Electron Mirror of China
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"

## or for a local mirror
ELECTRON_MIRROR="https://10.1.2.105/"
ELECTRON_CUSTOM_DIR="our/internal/filePath"

You can set ELECTRON_MIRROR in .npmrc as well, using the lowercase name:

electron_mirror=https://10.1.2.105/

Cache location

The location of the cache depends on the operating system, the defaults are:

  • Linux: $XDG_CACHE_HOME or ~/.cache/electron/
  • MacOS: ~/Library/Caches/electron/
  • Windows: $LOCALAPPDATA/electron/Cache or ~/AppData/Local/electron/Cache/