Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
task('ts', () => {
return argv().commonjs
? 'ts:commonjs-only'
: parallel('ts:commonjs', 'ts:esm', condition('ts:amd', () => argv().production && !argv().min));
});
amd: () => {
const extraOptions = getExtraTscParams(argv());
return tscTask({ ...extraOptions, outDir: 'lib-amd', module: 'amd' });
},
commonjsOnly: () => {
task('ts', () => {
return tscTask({
pretty: true,
...(argv().production && {
inlineSources: true,
sourceRoot: path.relative(libPath, srcPath),
}),
target: 'es5',
module: 'commonjs',
});
});
task('clean', () => {
exports.jestWatch = () => {
const args = argv();
return jestTask({
...(process.env.TF_BUILD && { runInBand: true }),
...(args.u || args.updateSnapshot ? { updateSnapshot: true } : undefined),
watch: true,
_: ['-i', ...(args._ || []).filter(arg => arg !== 'jest-watch')]
});
};
exports.jest = () =>
jestTask({
...(process.env.TF_BUILD && { runInBand: true }),
...(argv().u || argv().updateSnapshot ? { updateSnapshot: true } : undefined)
});