Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;