Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
});
task(
'build',
series(
condition('clean', () => argv().clean),
'eslint',
'initRNLibraries',
'copyFlowFiles',
'copyPngFiles',
// native-bundle:filtered
// trickle
// react-test
'ts',
condition('apiExtractorVerify', () => argv().ci),
'apiExtractorUpdate',
'apiDocumenter',
),
);
task('bundle-size-collect', bundleSizeCollect);
task('check-for-modified-files', checkForModifiedFiles);
task('generate-version-files', generateVersionFiles);
task('generate-package-manifest', generatePackageManifestTask);
task('ts', () => {
return argv().commonjs
? 'ts:commonjs-only'
: parallel('ts:commonjs', 'ts:esm', condition('ts:amd', () => argv().production && !argv().min));
});
task('validate', fs.existsSync(path.join(process.cwd(), 'jest.config.js')) ? series('tslint', 'jest') : 'tslint');
task('code-style', series('prettier', 'tslint'));
task('update-api', series('clean', 'copy', 'sass', 'ts', 'update-api-extractor'));
task('dev', series('clean', 'copy', 'sass', 'webpack-dev-server'));
task('build:node-lib', series('clean', 'copy', series(condition('validate', () => !argv().min), 'ts:commonjs-only'))).cached();
task(
'build',
series(
'clean',
'copy',
'sass',
parallel(
condition('validate', () => !argv().min),
series(
'ts',
parallel(
condition('webpack', () => !argv().min && !!resolveCwd('webpack.config.js')),
condition('lint-imports', () => !argv().min)
)
)
condition('clean', () => true || argv().clean),
'eslint',
condition('apiExtractorVerify', () => argv().ci),
'apiExtractorUpdate',
condition('clean', () => argv().clean),
'eslint',
task('validate', fs.existsSync(path.join(process.cwd(), 'jest.config.js')) ? series('tslint', 'jest') : 'tslint');
task('code-style', series('prettier', 'tslint'));
task('update-api', series('clean', 'copy', 'sass', 'ts', 'update-api-extractor'));
task('dev', series('clean', 'copy', 'sass', 'webpack-dev-server'));
task('build:node-lib', series('clean', 'copy', series(condition('validate', () => !argv().min), 'ts:commonjs-only'))).cached();
task(
'build',
series(
'clean',
'copy',
'sass',
parallel(
condition('validate', () => !argv().min),
series(
'ts',
parallel(
condition('webpack', () => !argv().min && !!resolveCwd('webpack.config.js')),
condition('lint-imports', () => !argv().min)
)
)
)
)
).cached();
task('no-op', () => {}).cached();
};
task('build:node-lib', series('clean', 'copy', series(condition('validate', () => !argv().min), 'ts:commonjs-only'))).cached();
task(
'build',
series(
'clean',
'copy',
'sass',
parallel(
condition('validate', () => !argv().min),
series(
'ts',
parallel(
condition('webpack', () => !argv().min && !!resolveCwd('webpack.config.js')),
condition('lint-imports', () => !argv().min)
)
)
)
)
).cached();
task('no-op', () => {}).cached();
};