How to use the @angular/tsc-wrapped/src/tsc.Tsc function in @angular/tsc-wrapped

To help you get started, we’ve selected a few @angular/tsc-wrapped 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 rangle / angular-ssr / source / application / compiler / options.ts View on Github external
export const projectToOptions = (project: Project): CompilationOptions => {
  const tsc = new Tsc();

  const {parsed, ngOptions: ng} = tsc.readConfiguration(
    project.tsconfig.toString(),
    project.basePath.toString());

  const ts = adjustOptions(parsed.options);

  ng.basePath = project.basePath.toString();
  ts.declaration = true;
  ng.declaration = true;
  ng.genDir = ts.outDir ? join(project.basePath.toString(), ts.outDir) : null;
  ng.basePath = project.basePath.toString();
  ng.skipMetadataEmit = false;
  ng.skipTemplateCodegen = false;
  ng.enableLegacyTemplate = true;