Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
task('copyFlowFiles', () => {
return copyTask(['src/**/*.js'], '.');
});
task('initRNLibraries', () => {
function copy() {
let tasks = [];
let configPath = path.resolve(process.cwd(), 'config/pre-copy.json');
if (!fs.existsSync(configPath)) {
return;
}
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
if (config && config.copyTo) {
for (let destination in config.copyTo) {
const sources = config.copyTo[destination];
destination = path.resolve(process.cwd(), destination);
tasks.push(copyTask(sources.map(src => expandSourcePath(src)), destination));
}
}
return series.apply(null, tasks);
}
option,
condition,
tscTask,
copyTask,
argv
} = require('just-scripts');
option('min', { alias: 'npm-install-mode' });
taskPresets.lib();
task('ts', tscTask({ module: 'commonjs', outDir: './lib' }));
task(
'copy',
copyTask(
[
'../office-ui-fabric-react/src/utilities/exampleData.ts',
'../office-ui-fabric-react/src/components/ExtendedPicker/examples/PeopleExampleData.ts',
'../office-ui-fabric-react/src/common/TestImages.ts'
],
'lib'
)
);
task(
'build',
series('clean', 'copy', parallel('ts', condition('jest', () => !argv().min)))
).cached();
task('copyPngFiles', () => {
return copyTask(['src/**/*.png'], '.');
});
task('initRNLibraries', () => {