How to use the just-scripts.condition 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 / packages / react-native-win32 / just-task.js View on Github external
);
});

task(
  'build',
  series(
    condition('clean', () => argv().clean),
    'eslint',
    'initRNLibraries',
    'copyFlowFiles',
    'copyPngFiles',
    // native-bundle:filtered
    // trickle
    // react-test
    'ts',
    condition('apiExtractorVerify', () => argv().ci),
    'apiExtractorUpdate',
    'apiDocumenter',
  ),
);
github OfficeDev / office-ui-fabric-react / scripts / just.config.js View on Github external
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)
          )
        )
github microsoft / react-native-windows / vnext / just-task.js View on Github external
    condition('clean', () => true || argv().clean),
    'eslint',
github microsoft / react-native-windows / vnext / just-task.js View on Github external
    condition('apiExtractorVerify', () => argv().ci),
    'apiExtractorUpdate',
github OfficeDev / office-ui-fabric-react / scripts / just.config.js View on Github external
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();
};
github OfficeDev / office-ui-fabric-react / scripts / just.config.js View on Github external
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();
};