tasks/node_version.js
function() {
      nvmLs('remote', function() {

        bestMatch = semver.maxSatisfying(remotes, expected);
        nvmUse = nvmInit + 'nvm use ' + bestMatch;

        var command = nvmInit + 'nvm install ' + bestMatch;

        childProcess.exec(command, cmdOpts,function(err, stdout, stderr) {
          if (err) { throw err ;}
          var nodeVersion = stdout.split(' ')[3];
          grunt.log.ok('Installed node v' + bestMatch);
          printVersion(nodeVersion);
          extendExec();
          checkPackages(options.globals);
        });
      });
    }
function() {
      nvmLs('remote', function() {

        bestMatch = semver.maxSatisfying(remotes, expected);
        nvmUse = nvmInit + 'nvm use ' + bestMatch;

        var command = nvmInit + 'nvm install ' + bestMatch;

        childProcess.exec(command, cmdOpts,function(err, stdout, stderr) {
          if (err) { throw err ;}
          var nodeVersion = stdout.split(' ')[3];
          grunt.log.ok('Installed node v' + bestMatch);
          printVersion(nodeVersion);
          extendExec();
          checkPackages(options.globals);
        });
      });
    }
function ( ) { nvmLs ( 'remote' , function ( ) { bestMatch = semver . maxSatisfying ( remotes , expected ) ; nvmUse = nvmInit + 'nvm use ' + bestMatch ; var command = nvmInit + 'nvm install ' + bestMatch ; childProcess . exec ( command , cmdOpts , function ( err , stdout , stderr ) { if ( err ) { throw err ; } var nodeVersion = stdout . split ( ' ' ) [ 3 ] ; grunt . log . ok ( 'Installed node v' + bestMatch ) ; printVersion ( nodeVersion ) ; extendExec ( ) ; checkPackages ( options . globals ) ; } ) ; } ) ; }
Install latest compatible node version
Install latest compatible node version