src/execute.js
function createObservable (cfg) {
    const {dir, taskSet, tasksToRun, watchMode, spawn, env, log} = cfg;

    const tasks = tasksToRun.map(taskName => {
        const commandList = taskSet[taskName];
        if (!commandList)
            throw new Error (`No such task name: ${taskName} was configured`);
        return commandList;
    });

    return createParallellCommandsExecutor (
        tasks,
        dir,
        env,
        watchMode,
        {spawn, log});
}
function createObservable (cfg) {
    const {dir, taskSet, tasksToRun, watchMode, spawn, env, log} = cfg;

    const tasks = tasksToRun.map(taskName => {
        const commandList = taskSet[taskName];
        if (!commandList)
            throw new Error (`No such task name: ${taskName} was configured`);
        return commandList;
    });

    return createParallellCommandsExecutor (
        tasks,
        dir,
        env,
        watchMode,
        {spawn, log});
}
function createObservable ( cfg ) { const { dir , taskSet , tasksToRun , watchMode , spawn , env , log } = cfg ; const tasks = tasksToRun . map ( taskName => { const commandList = taskSet [ taskName ] ; if ( ! commandList ) throw new Error ( ` ${ taskName } ` ) ; return commandList ; } ) ; return createParallellCommandsExecutor ( tasks , dir , env , watchMode , { spawn , log } ) ; }
Create a build-task executer as an Observable

@param cfg {{
dir: string,
taskSet: Object.<string, string[]>,
tasksToRun: string[],
watchMode: boolean,
spawn: Function,
env: Object,
log: Function
}} Configuration to execute
@return Observable
Create a build - task executer as an Observable