lib/electronBuilder.js
function removeDir(dirPath, delay = 0) {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            rimraf(dirPath, {
                maxBusyTries: 100
            }, (err) => {
                if (err) {
                    reject(err);
                } else {
                    resolve();
                }
            });
        }, delay);
    });
}
function removeDir(dirPath, delay = 0) {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            rimraf(dirPath, {
                maxBusyTries: 100
            }, (err) => {
                if (err) {
                    reject(err);
                } else {
                    resolve();
                }
            });
        }, delay);
    });
}
function removeDir ( dirPath , delay = 0 ) { return new Promise ( ( resolve , reject ) => { setTimeout ( ( ) => { rimraf ( dirPath , { maxBusyTries : 100 } , ( err ) => { if ( err ) { reject ( err ) ; } else { resolve ( ) ; } } ) ; } , delay ) ; } ) ; }
Promisfied rimraf.

@param {string} dirPath - path to the dir to be deleted
@param {number} delay - delay the task by ms
@returns {Promise<any>}
Promisfied rimraf .