src/execute.js
function executeAll (cfg) {
    console.log(`${clr.DIM+clr.LIGHT_MAGENTA}Package: ${cfg.packageRoot}${clr.RESET}`);
    return new Promise((resolve, reject) => {
        createObservable(cfg).subscribe({
            next ({command, exitCode}) {
                if (exitCode == 0)
                    cfg.log(`${EMIT_COLOR}just-build ${cfg.tasksToRun.join(' ')}`+
                            ` done.${clr.RESET}${cfg.watchMode ? NOW_WATCHING_COLOR+' Still watching...'+clr.RESET : ''}`);
                else 
                    cfg.log(`just-build ${cfg.tasksToRun.join(' ')} failed. ${command} returned ${exitCode}`);
            },
            error (err) {
                reject(err);
            },
            complete () {
                resolve();
            }                
        });
    });
}
function executeAll (cfg) {
    console.log(`${clr.DIM+clr.LIGHT_MAGENTA}Package: ${cfg.packageRoot}${clr.RESET}`);
    return new Promise((resolve, reject) => {
        createObservable(cfg).subscribe({
            next ({command, exitCode}) {
                if (exitCode == 0)
                    cfg.log(`${EMIT_COLOR}just-build ${cfg.tasksToRun.join(' ')}`+
                            ` done.${clr.RESET}${cfg.watchMode ? NOW_WATCHING_COLOR+' Still watching...'+clr.RESET : ''}`);
                else 
                    cfg.log(`just-build ${cfg.tasksToRun.join(' ')} failed. ${command} returned ${exitCode}`);
            },
            error (err) {
                reject(err);
            },
            complete () {
                resolve();
            }                
        });
    });
}
function executeAll ( cfg ) { console . log ( ` ${ clr . DIM + clr . LIGHT_MAGENTA } ${ cfg . packageRoot } ${ clr . RESET } ` ) ; return new Promise ( ( resolve , reject ) => { createObservable ( cfg ) . subscribe ( { next ( { command , exitCode } ) { if ( exitCode == 0 ) cfg . log ( ` ${ EMIT_COLOR } ${ cfg . tasksToRun . join ( ' ' ) } ` + ` ${ clr . RESET } ${ cfg . watchMode ? NOW_WATCHING_COLOR + ' Still watching...' + clr . RESET : '' } ` ) ; else cfg . log ( ` ${ cfg . tasksToRun . join ( ' ' ) } ${ command } ${ exitCode } ` ) ; } , error ( err ) { reject ( err ) ; } , complete ( ) { resolve ( ) ; } } ) ; } ) ; }
Execute the build tasks.

@param cfg {{
dir: string,
taskSet: Object.<string, string[]>,
tasksToRun: string[],
watchMode: boolean,
spawn: Function,
env: Object,
log: Function,
packageRoot: string
}} Configuration to execute
@return Promise
Execute the build tasks .