build: replace electron-download with @electron/get
This commit is contained in:
Родитель
7d080dd81c
Коммит
b5f619661b
|
@ -385,7 +385,7 @@ The project's configured to run automated tests on CircleCI.
|
|||
|
||||
If you wish to manually test the module, first comment out `opts.identity` in `test/basic.js` to enable auto discovery. Then run the command `npm test` from the dev directory.
|
||||
|
||||
When this command is run for the first time: `electron-download` will download macOS Electron releases defined in `test/config.json`, and save to `~/.electron/`, which might take up less than 1GB of disk space.
|
||||
When this command is run for the first time: `@electron/get` will download macOS Electron releases defined in `test/config.json` and save to `~/Library/Caches/electron/`, which might take up less than 1GB of disk space.
|
||||
|
||||
A successful testing should look something like:
|
||||
|
||||
|
@ -398,7 +398,7 @@ $ npm test
|
|||
> electron-osx-sign@0.4.15 test electron-osx-sign
|
||||
> standard && tape test
|
||||
|
||||
Calling electron-download before running tests...
|
||||
Downloading Electron prebuilt binaries before running tests...
|
||||
Running tests...
|
||||
TAP version 13
|
||||
# setup
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"plist": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron-download": "^4.1.0",
|
||||
"@electron/get": "^1.9.0",
|
||||
"eslint": "^4.2.0",
|
||||
"eslint-config-eslint": "^4.0.0",
|
||||
"extract-zip": "^1.6.5",
|
||||
|
|
|
@ -9,7 +9,7 @@ series([
|
|||
child.exec('which codesign', cb)
|
||||
},
|
||||
function (cb) {
|
||||
console.log('Calling electron-download before running tests...')
|
||||
console.log('Downloading Electron prebuilt binaries before running tests...')
|
||||
util.downloadElectrons(cb)
|
||||
}
|
||||
], function (err) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var path = require('path')
|
||||
var test = require('tape')
|
||||
|
||||
var download = require('electron-download')
|
||||
const { download } = require('@electron/get')
|
||||
var mkdirp = require('mkdirp')
|
||||
var rimraf = require('rimraf')
|
||||
var series = require('run-series')
|
||||
|
@ -45,10 +45,9 @@ exports.generateAppPath = function getExtractName (release) {
|
|||
exports.downloadElectrons = function downloadElectrons (callback) {
|
||||
series(releases.map(function (release) {
|
||||
return function (cb) {
|
||||
download(release, function (err, zipPath) {
|
||||
if (err) return callback(err)
|
||||
extract(zipPath, {dir: path.join(WORK_CWD, exports.generateReleaseName(release))}, cb)
|
||||
})
|
||||
download(release)
|
||||
.then(zipPath => extract(zipPath, {dir: path.join(WORK_CWD, exports.generateReleaseName(release))}, cb))
|
||||
.catch(cb)
|
||||
}
|
||||
}), callback)
|
||||
}
|
||||
|
|
988
yarn.lock
988
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче