aio/tools/examples/run-example-e2e.js
function runProtractorAoT(appDir, outputFile) {
  fs.appendFileSync(outputFile, '++ AoT version ++\n');
  const aotBuildSpawnInfo = spawnExt('yarn', ['build:aot'], {cwd: appDir});
  let promise = aotBuildSpawnInfo.promise;

  const copyFileCmd = 'copy-dist-files.js';
  if (fs.existsSync(appDir + '/' + copyFileCmd)) {
    promise = promise.then(() => spawnExt('node', [copyFileCmd], {cwd: appDir}).promise);
  }
  const aotRunSpawnInfo = spawnExt('yarn', ['serve:aot'], {cwd: appDir}, true);
  return runProtractorSystemJS(promise, appDir, aotRunSpawnInfo, outputFile);
}
function runProtractorAoT(appDir, outputFile) {
  fs.appendFileSync(outputFile, '++ AoT version ++\n');
  const aotBuildSpawnInfo = spawnExt('yarn', ['build:aot'], {cwd: appDir});
  let promise = aotBuildSpawnInfo.promise;

  const copyFileCmd = 'copy-dist-files.js';
  if (fs.existsSync(appDir + '/' + copyFileCmd)) {
    promise = promise.then(() => spawnExt('node', [copyFileCmd], {cwd: appDir}).promise);
  }
  const aotRunSpawnInfo = spawnExt('yarn', ['serve:aot'], {cwd: appDir}, true);
  return runProtractorSystemJS(promise, appDir, aotRunSpawnInfo, outputFile);
}
function runProtractorAoT ( appDir , outputFile ) { fs . appendFileSync ( outputFile , '++ AoT version ++\n' ) ; const aotBuildSpawnInfo = spawnExt ( 'yarn' , [ 'build:aot' ] , { cwd : appDir } ) ; let promise = aotBuildSpawnInfo . promise ; const copyFileCmd = 'copy-dist-files.js' ; if ( fs . existsSync ( appDir + '/' + copyFileCmd ) ) { promise = promise . then ( ( ) => spawnExt ( 'node' , [ copyFileCmd ] , { cwd : appDir } ) . promise ) ; } const aotRunSpawnInfo = spawnExt ( 'yarn' , [ 'serve:aot' ] , { cwd : appDir } , true ) ; return runProtractorSystemJS ( promise , appDir , aotRunSpawnInfo , outputFile ) ; }
Run e2e tests over the AOT build for projects that examples it.
Run e2e tests over the AOT build for projects that examples it .