How to use the @bazel/typescript.runAsWorker function in @bazel/typescript

To help you get started, we’ve selected a few @bazel/typescript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marcus-sa / svelte-ts / packages / bazel / internal / main.ts View on Github external
function main(args: string[]): number {
  if (runAsWorker(args)) {
    runWorkerLoop((args, inputs) => {
      const svelteBazelCompiler = new SvelteBazelCompiler(args, inputs);
      return svelteBazelCompiler.compile();
    });
  } else {
    const svelteBazelCompiler = new SvelteBazelCompiler(args);
    return svelteBazelCompiler.compile() ? 0 : 1;
  }

  return 0;
}
github angular / angular / packages / bazel / src / ngc-wrapped / index.ts View on Github external
export function main(args) {
  if (runAsWorker(args)) {
    runWorkerLoop(runOneBuild);
  } else {
    return runOneBuild(args) ? 0 : 1;
  }
  return 0;
}