Package Exports
- @electron/get
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@electron/get) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@electron/get
Download Electron release artifacts
Usage
Simple: Downloading an Electron Binary ZIP
import { download } from '@electron/get';
// NB: Use this syntax within an async function, Node does not have support for
// top-level await as of Node 12.
const zipFilePath = await download('4.0.4');
Advanced: Downloading a macOS Electron Symbol File
import { downloadArtifact } from '@electron/get';
// NB: Use this syntax within an async function, Node does not have support for
// top-level await as of Node 12.
const zipFilePath = await downloadArtifact({
version: '4.0.4',
platform: 'darwin',
artifactName: 'electron',
artifactSuffix: 'symbols',
arch: 'x64',
});
How It Works
This module downloads Electron to a known place on your system and caches it so that future requests for that asset can be returned instantly. The cache locations are:
- Linux:
$XDG_CACHE_HOME
or~/.cache/electron/
- MacOS:
~/Library/Caches/electron/
- Windows:
%LOCALAPPDATA%/electron/Cache
or~/AppData/Local/electron/Cache/
By default, the module uses got
as the
downloader. As a result, you can use the same options
via downloadOptions
.