docs: update installation docs to reflect latest @electron/get changes (#21491)

* doc: update Chinese Electron mirror URL

* doc: replace remaining references of electron-download with @electron/get

* doc: update cache dir example based on recent @electron/get cache changes
This commit is contained in:
Mark Lee 2019-12-16 08:16:55 -08:00 committed by Shelley Vohr
parent 5f2b6f71b5
commit 9c442e0a7e

View file

@ -56,7 +56,7 @@ can do so by either providing a mirror or an existing cache directory.
#### Mirror #### Mirror
You can use environment variables to override the base URL, the path at which to You can use environment variables to override the base URL, the path at which to
look for Electron binaries, and the binary filename. The url used by `electron-download` look for Electron binaries, and the binary filename. The url used by `@electron/get`
is composed as follows: is composed as follows:
```plaintext ```plaintext
@ -66,11 +66,11 @@ url = ELECTRON_MIRROR + ELECTRON_CUSTOM_DIR + '/' + ELECTRON_CUSTOM_FILENAME
For instance, to use the China mirror: For instance, to use the China mirror:
```plaintext ```plaintext
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/" ELECTRON_MIRROR="https://cdn.npm.taobao.org/dist/electron/"
``` ```
#### Cache #### Cache
Alternatively, you can override the local cache. `electron-download` will cache Alternatively, you can override the local cache. `@electron/get` will cache
downloaded binaries in a local directory to not stress your network. You can use downloaded binaries in a local directory to not stress your network. You can use
that cache folder to provide custom builds of Electron or to avoid making contact that cache folder to provide custom builds of Electron or to avoid making contact
with the network at all. with the network at all.
@ -89,16 +89,26 @@ The cache contains the version's official zip file as well as a checksum, stored
a text file. A typical cache might look like this: a text file. A typical cache might look like this:
```sh ```sh
├── electron-v1.7.9-darwin-x64.zip ├── httpsgithub.comelectronelectronreleasesdownloadv1.7.9electron-v1.7.9-darwin-x64.zip
├── electron-v1.8.1-darwin-x64.zip │ └── electron-v1.7.9-darwin-x64.zip
├── electron-v1.8.2-beta.1-darwin-x64.zip ├── httpsgithub.comelectronelectronreleasesdownloadv1.7.9SHASUMS256.txt
├── electron-v1.8.2-beta.2-darwin-x64.zip │ └── SHASUMS256.txt
├── electron-v1.8.2-beta.3-darwin-x64.zip ├── httpsgithub.comelectronelectronreleasesdownloadv1.8.1electron-v1.8.1-darwin-x64.zip
├── SHASUMS256.txt-1.7.9 │ └── electron-v1.8.1-darwin-x64.zip
├── SHASUMS256.txt-1.8.1 ├── httpsgithub.comelectronelectronreleasesdownloadv1.8.1SHASUMS256.txt
├── SHASUMS256.txt-1.8.2-beta.1 │ └── SHASUMS256.txt
├── SHASUMS256.txt-1.8.2-beta.2 ├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.1electron-v1.8.2-beta.1-darwin-x64.zip
├── SHASUMS256.txt-1.8.2-beta.3 │ └── electron-v1.8.2-beta.1-darwin-x64.zip
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.1SHASUMS256.txt
│ └── SHASUMS256.txt
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.2electron-v1.8.2-beta.2-darwin-x64.zip
│ └── electron-v1.8.2-beta.2-darwin-x64.zip
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.2SHASUMS256.txt
│ └── SHASUMS256.txt
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.3electron-v1.8.2-beta.3-darwin-x64.zip
│ └── electron-v1.8.2-beta.3-darwin-x64.zip
└── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.3SHASUMS256.txt
└── SHASUMS256.txt
``` ```
## Skip binary download ## Skip binary download