Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map(f => join(path, f)));
parsed.files = parsed.files.filter((f: string, i: number) => parsed.files.indexOf(f) === i);
parsed.files.push(join(Config.BOOTSTRAP_DIR, 'main.web.ts'));
return JSON.stringify(parsed, null, 2);
});
const args = argv;
// If a translation, tell the compiler
if (args.lang) {
args['i18nFile'] = `./src/client/assets/locale/messages.${args.lang}.xlf`;
args['locale'] = args.lang;
args['i18nFormat'] = 'xlf';
}
const cliOptions = new NgcCliOptions(args);
main(Config.TMP_DIR, cliOptions, codegen)
.then(done)
.catch(e => {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
};
.filter(f => f.endsWith('d.ts'))
.map(f => join(path, f)));
parsed.files.push(join(Config.BOOTSTRAP_DIR, 'main.ts'));
return JSON.stringify(parsed, null, 2);
});
const args = argv;
// If a translation, tell the compiler
if (args.lang) {
args['i18nFile'] = `./src/client/assets/locale/messages.${args.lang}.xlf`;
args['locale'] = args.lang;
args['i18nFormat'] = 'xlf';
}
const cliOptions = new NgcCliOptions(args);
main(Config.TMP_DIR, cliOptions, codegen)
.then(done)
.catch(e => {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
};
.map(f => join(path, f)));
parsed.files = parsed.files.filter((f: string, i: number) => parsed.files.indexOf(f) === i);
parsed.files.push(join(Config.BOOTSTRAP_DIR, Config.BOOTSTRAP_PROD_MODULE+'.ts'));
return JSON.stringify(parsed, null, 2);
});
const args = argv;
// If a translation, tell the compiler
if (args.lang) {
args['i18nFile'] = `./src/client/assets/locale/messages.${args.lang}.xlf`;
args['locale'] = args.lang;
args['i18nFormat'] = 'xlf';
}
const cliOptions = new NgcCliOptions(args);
main(Config.TMP_DIR, cliOptions, codegen)
.then(done)
.catch(e => {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
};
.map(f => join(path, f)));
parsed.files = parsed.files.filter((f: string, i: number) => parsed.files.indexOf(f) === i);
parsed.files.push(join(Config.BOOTSTRAP_DIR, 'main.ts'));
return JSON.stringify(parsed, null, 2);
});
const args = argv;
// If a translation, tell the compiler
if (args.lang) {
args['i18nFile'] = `./src/client/assets/locale/messages.${args.lang}.xlf`;
args['locale'] = args.lang;
args['i18nFormat'] = 'xlf';
}
const cliOptions = new NgcCliOptions(args);
main(Config.TMP_DIR, cliOptions, codegen)
.then(done)
.catch(e => {
console.error(e.stack);
console.error('Compilation failed');
process.exit(1);
});
};
return (done: DoneCallback) => {
const cliOptions = new NgcCliOptions({});
const tsOptions: ts.CompilerOptions = {
...extraCompilerOptions,
target: target === 'es6' ? ts.ScriptTarget.ES2016 : ts.ScriptTarget.ES5,
importHelpers: true
};
ngc(sourceDirectory, cliOptions, codegen, tsOptions)
.then(done)
.catch((error) => {
(console).error(error.stack);
(console).error('Compilation failed');
process.exit(1);
});
};
}
export function runInternal(project: string, cliOptions: NgcCliOptions, webpack: WebpackWrapper): Promise {
return tscWrappedMain(project, cliOptions, codeGenFactory(webpack))
.then(() => webpack.emitOnCompilationSuccess())
.catch(e => {
webpack.emitOnCompilationError(e);
throw e;
});
}