bin/tool-runner.js
function prepareRelease() {
  // Load WTF binary. Search a few paths.
  // TODO(benvanik): look in ENV?
  var searchPaths = [
    '.',
    './build-out',
    '../build-out'
  ];
  var modulePath = path.dirname(module.filename);
  var wtfPath = null;
  for (var n = 0; n < searchPaths.length; n++) {
    var searchPath = path.join(
        searchPaths[n], 'wtf_node_js_compiled.js');
    searchPath = path.join(modulePath, searchPath);
    if (fs.existsSync(searchPath)) {
      wtfPath = path.relative(modulePath, searchPath);
      break;
    }
  }
  if (!wtfPath) {
    console.log('Unable to find wtf_node_js_compiled.js');
    process.exit(-1);
    return;
  }
  var wtf = require(wtfPath.replace('.js', ''));
  global.wtf = wtf;
}
function prepareRelease() {
  // Load WTF binary. Search a few paths.
  // TODO(benvanik): look in ENV?
  var searchPaths = [
    '.',
    './build-out',
    '../build-out'
  ];
  var modulePath = path.dirname(module.filename);
  var wtfPath = null;
  for (var n = 0; n < searchPaths.length; n++) {
    var searchPath = path.join(
        searchPaths[n], 'wtf_node_js_compiled.js');
    searchPath = path.join(modulePath, searchPath);
    if (fs.existsSync(searchPath)) {
      wtfPath = path.relative(modulePath, searchPath);
      break;
    }
  }
  if (!wtfPath) {
    console.log('Unable to find wtf_node_js_compiled.js');
    process.exit(-1);
    return;
  }
  var wtf = require(wtfPath.replace('.js', ''));
  global.wtf = wtf;
}
function prepareRelease ( ) { // Load WTF binary. Search a few paths. // TODO(benvanik): look in ENV? var searchPaths = [ '.' , './build-out' , '../build-out' ] ; var modulePath = path . dirname ( module . filename ) ; var wtfPath = null ; for ( var n = 0 ; n < searchPaths . length ; n ++ ) { var searchPath = path . join ( searchPaths [ n ] , 'wtf_node_js_compiled.js' ) ; searchPath = path . join ( modulePath , searchPath ) ; if ( fs . existsSync ( searchPath ) ) { wtfPath = path . relative ( modulePath , searchPath ) ; break ; } } if ( ! wtfPath ) { console . log ( 'Unable to find wtf_node_js_compiled.js' ) ; process . exit ( - 1 ) ; return ; } var wtf = require ( wtfPath . replace ( '.js' , '' ) ) ; global . wtf = wtf ; }
Prepares the global context for running a tool with the release WTF.
Prepares the global context for running a tool with the release WTF .