mirror of https://github.com/jiahaog/Nativefier
Fix deprecations: electron-packager cb->promise, mocha compilers->require
This commit is contained in:
parent
69a5b2cbbe
commit
6a8114e505
|
@ -13,7 +13,7 @@ gulp.task('mocha', (done) => {
|
||||||
.pipe(istanbul.hookRequire()) // Force `require` to return covered files
|
.pipe(istanbul.hookRequire()) // Force `require` to return covered files
|
||||||
.on('finish', () => gulp.src(PATHS.TEST_SRC, { read: false })
|
.on('finish', () => gulp.src(PATHS.TEST_SRC, { read: false })
|
||||||
.pipe(mocha({
|
.pipe(mocha({
|
||||||
compilers: 'js:babel-core/register',
|
require: 'babel-core/register',
|
||||||
recursive: true,
|
recursive: true,
|
||||||
}))
|
}))
|
||||||
.pipe(istanbul.writeReports({
|
.pipe(istanbul.writeReports({
|
||||||
|
|
|
@ -202,13 +202,15 @@ function buildMain(inpOptions, callback) {
|
||||||
|
|
||||||
packagerConsole.override();
|
packagerConsole.override();
|
||||||
|
|
||||||
packager(packageOptions, (error, appPathArray) => {
|
packager(packageOptions)
|
||||||
// restore console.error
|
.then(appPathArray => {
|
||||||
packagerConsole.restore();
|
packagerConsole.restore(); // restore console.error
|
||||||
|
cb(null, opts, appPathArray); // options still contain the icon to waterfall
|
||||||
// pass options which still contains the icon to waterfall
|
})
|
||||||
cb(error, opts, appPathArray);
|
.catch(error => {
|
||||||
});
|
packagerConsole.restore(); // restore console.error
|
||||||
|
cb(error, opts); // options still contain the icon to waterfall
|
||||||
|
});
|
||||||
},
|
},
|
||||||
(opts, appPathArray, cb) => {
|
(opts, appPathArray, cb) => {
|
||||||
progress.tick('finalizing');
|
progress.tick('finalizing');
|
||||||
|
|
Loading…
Reference in New Issue