src/yake/tasks.js
function requireTasks(yakefile, taskCollection)
{
    const debug = false;
    globals.globalTaskCollection = taskCollection;

    if (debug) debugLog(`loadTasks: called ${yakefile}`);

    /* eslint-disable global-require */
    require(yakefile);
    /* eslint-disable global-require */
    
    const newTaskCollection = globals.globalTaskCollection;

    return newTaskCollection; // no copy - untidy functional programming
}
function requireTasks(yakefile, taskCollection)
{
    const debug = false;
    globals.globalTaskCollection = taskCollection;

    if (debug) debugLog(`loadTasks: called ${yakefile}`);

    /* eslint-disable global-require */
    require(yakefile);
    /* eslint-disable global-require */
    
    const newTaskCollection = globals.globalTaskCollection;

    return newTaskCollection; // no copy - untidy functional programming
}
function requireTasks ( yakefile , taskCollection ) { const debug = false ; globals . globalTaskCollection = taskCollection ; if ( debug ) debugLog ( ` ${ yakefile } ` ) ; /* eslint-disable global-require */ require ( yakefile ) ; /* eslint-disable global-require */ const newTaskCollection = globals . globalTaskCollection ; return newTaskCollection ; // no copy - untidy functional programming }
Loads tasks from a yakefile into taskCollection and returns the updated taskCollection.
It does this by a dynamic 'require'

@param {string}              yakefile - full path to yakefile - assume it exists
@parame {TaskCollection}     taskCollection - collection into which tasks will be placed

@return {TaskCollection}     update taskCollection
Loads tasks from a yakefile into taskCollection and returns the updated taskCollection . It does this by a dynamic require