How to use the just-task.condition function in just-task

To help you get started, we’ve selected a few just-task 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 OfficeDev / office-ui-fabric-react / scripts / just-task.js View on Github external
registerTask('perf-test', perfTest);

task('ts', parallel('ts:commonjs', 'ts:esm', condition('ts:amd', () => argv().production && !argv().min)));

task(
  'build',
  series(
    'clean',
    'copy',
    'sass',
    parallel(
      condition('tslint', () => !argv().min),
      condition('jest', () => !argv().min),
      series(
        argv().commonjs ? 'ts:commonjs-only' : 'ts',
        condition('lint-imports', () => !argv().min),
        parallel(condition('webpack', () => !argv().min), condition('verify-api-extractor', () => !argv().min))
      )
    )
  )
);

// Special case build for the serializer, which needs to absolutely run typescript and jest serially.
task('build-jest-serializer-merge-styles', series('ts', 'jest'));

task('build-commonjs-only', series('clean', 'ts:commonjs-only'));
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'));

// Utility functions
github OfficeDev / office-ui-fabric-react / scripts / just-task.js View on Github external
registerTask('bundle-size-collect', bundleSizeCollect);
registerTask('check-for-modified-files', checkForModifiedFiles);
registerTask('generate-version-files', generateVersionFiles);
registerTask('perf-test', perfTest);

task('ts', parallel('ts:commonjs', 'ts:esm', condition('ts:amd', () => argv().production && !argv().min)));

task(
  'build',
  series(
    'clean',
    'copy',
    'sass',
    parallel(
      condition('tslint', () => !argv().min),
      condition('jest', () => !argv().min),
      series(
        argv().commonjs ? 'ts:commonjs-only' : 'ts',
        condition('lint-imports', () => !argv().min),
        parallel(condition('webpack', () => !argv().min), condition('verify-api-extractor', () => !argv().min))
      )
    )
  )
);

// Special case build for the serializer, which needs to absolutely run typescript and jest serially.
task('build-jest-serializer-merge-styles', series('ts', 'jest'));

task('build-commonjs-only', series('clean', 'ts:commonjs-only'));
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'));
github OfficeDev / office-ui-fabric-react / scripts / just-task.js View on Github external
registerTask('prettier', prettier);
registerTask('bundle-size-collect', bundleSizeCollect);
registerTask('check-for-modified-files', checkForModifiedFiles);
registerTask('generate-version-files', generateVersionFiles);
registerTask('perf-test', perfTest);

task('ts', parallel('ts:commonjs', 'ts:esm', condition('ts:amd', () => argv().production && !argv().min)));

task(
  'build',
  series(
    'clean',
    'copy',
    'sass',
    parallel(
      condition('tslint', () => !argv().min),
      condition('jest', () => !argv().min),
      series(
        argv().commonjs ? 'ts:commonjs-only' : 'ts',
        condition('lint-imports', () => !argv().min),
        parallel(condition('webpack', () => !argv().min), condition('verify-api-extractor', () => !argv().min))
      )
    )
  )
);

// Special case build for the serializer, which needs to absolutely run typescript and jest serially.
task('build-jest-serializer-merge-styles', series('ts', 'jest'));

task('build-commonjs-only', series('clean', 'ts:commonjs-only'));
task('code-style', series('prettier', 'tslint'));
task('update-api', series('clean', 'copy', 'sass', 'ts', 'update-api-extractor'));