src/yake/main.js
function taskFileMain(argv)
{
    if( argv === undefined ) argv = process.argv

    const [options, args, helpText] = CLI.taskFileParse(argv);
    const collection = getTasksFromTaskfile();

    const p = loadPackageJson();
    if( tryShowVersion(options, p.version) )
        return;
    if( tryShowTasks(options, collection) )
        return;
    if( tryShowHelp(options, helpText) )
        return;

    tryRunTask(args, collection);
}
function taskFileMain(argv)
{
    if( argv === undefined ) argv = process.argv

    const [options, args, helpText] = CLI.taskFileParse(argv);
    const collection = getTasksFromTaskfile();

    const p = loadPackageJson();
    if( tryShowVersion(options, p.version) )
        return;
    if( tryShowTasks(options, collection) )
        return;
    if( tryShowHelp(options, helpText) )
        return;

    tryRunTask(args, collection);
}
function taskFileMain ( argv ) { if ( argv === undefined ) argv = process . argv const [ options , args , helpText ] = CLI . taskFileParse ( argv ) ; const collection = getTasksFromTaskfile ( ) ; const p = loadPackageJson ( ) ; if ( tryShowVersion ( options , p . version ) ) return ; if ( tryShowTasks ( options , collection ) ) return ; if ( tryShowHelp ( options , helpText ) ) return ; tryRunTask ( args , collection ) ; }
The mainline of a taskfile. Only depends on the options and arguments on the command line

@param      {Function}  argv    The argv
The mainline of a taskfile . Only depends on the options and arguments on the command line