How to use the just-scripts.copyTask function in just-scripts

To help you get started, we’ve selected a few just-scripts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / react-native-windows / vnext / just-task.js View on Github external
task('copyFlowFiles', () => {
  return copyTask(['src/**/*.js'], '.');
});
task('initRNLibraries', () => {
github OfficeDev / office-ui-fabric-react / scripts / tasks / copy.js View on Github external
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);
}
github OfficeDev / office-ui-fabric-react / packages / codepen-loader / just.config.js View on Github external
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();
github microsoft / react-native-windows / packages / react-native-win32 / just-task.js View on Github external
task('copyPngFiles', () => {
  return copyTask(['src/**/*.png'], '.');
});
task('initRNLibraries', () => {