How to use the just-task.argv 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 AgoraIO / Electron-SDK / just-task.js View on Github external
task('build:electron', () => {
  build({
    electronVersion: argv().electron_version, 
    runtime: argv().runtime, 
    platform: argv().platform, 
    packageVersion, 
    debug: argv().debug, 
    silent: argv().silent,
    msvsVersion: argv().msvs_version
  })
})
// npm run build:node --
github AgoraIO / Electron-SDK / just-task.js View on Github external
task('build:electron', () => {
  build({
    electronVersion: argv().electron_version, 
    runtime: argv().runtime, 
    platform: argv().platform, 
    packageVersion, 
    debug: argv().debug, 
    silent: argv().silent,
    msvsVersion: argv().msvs_version
  })
})
// npm run build:node --
github AgoraIO / Electron-SDK / just-task.js View on Github external
task('build:node', () => {
  build({
    electronVersion: argv().electron_version, 
    runtime: 'node',
    packageVersion,
    platform: argv().platform,
    debug: argv().debug, 
    silent: argv().silent,
    msvsVersion: argv().msvs_version
  })
})
// npm run download --
github microsoft / just / packages / just-scripts / src / tasks / webpackTask.ts View on Github external
return;
    }

    logger.info(`Running Webpack`);
    const webpackConfigPath = resolveCwd((options && options.config) || 'webpack.config.js');
    logger.info(`Webpack Config Path: ${webpackConfigPath}`);

    if (webpackConfigPath && fs.existsSync(webpackConfigPath)) {
      const configLoader = require(webpackConfigPath);

      let webpackConfigs: Configuration[];

      // If the loaded webpack config is a function
      // call it with the original process.argv arguments from build.js.
      if (typeof configLoader == 'function') {
        webpackConfigs = configLoader(argv());
      } else {
        webpackConfigs = configLoader;
      }

      if (!Array.isArray(webpackConfigs)) {
        webpackConfigs = [webpackConfigs];
      }

      // Convert everything to promises first to make sure we resolve all promises
      const webpackConfigPromises = await Promise.all(webpackConfigs.map(webpackConfig => Promise.resolve(webpackConfig)));

      // We support passing in arbitrary webpack config options that we need to merge with any read configs.
      // To do this, we need to filter out the properties that aren't valid config options and then run webpack merge.
      // A better long term solution here would be to have an option called webpackConfigOverrides instead of extending the configuration object.
      const { config, outputStats, nodeArgs, ...restConfig } = options || ({} as WebpackTaskOptions);
github OfficeDev / office-ui-fabric-react / scripts / just-tasks / jest.js View on Github external
exports.jest = () =>
  jestTask({
    ...(process.env.TRAVIS && { runInBand: true }),
    ...(process.env.TRAVIS || argv().production ? { coverage: true } : undefined),
    ...(argv().u || argv().updateSnapshot ? { updateSnapshot: true } : undefined)
  });
github microsoft / just / packages / just-scripts / src / tasks / addPackageTask.ts View on Github external
return async function addPackage() {
    const args = argv();
    const rootPath = findMonoRepoRootPath();

    const name =
      args.name ||
      (await prompts({
        type: 'text',
        name: 'name',
        message: 'What is the name of the package?'
      })).name;

    logger.info(`Creating a package called: ${name}`);

    if (!rootPath) {
      logger.warn('Cannot determine the root path to the mono repo');
      return;
    }
github microsoft / just / packages / just-scripts / src / tasks / addPackageTask.ts View on Github external
return async function addPackage() {
    const args = argv();
    const rootPath = findMonoRepoRootPath();

    const name =
      args.name ||
      (await prompts({
        type: 'text',
        name: 'name',
        message: 'What is the name of the package?'
      })).name;

    logger.info(`Creating a package called: ${name}`);

    if (!rootPath) {
      logger.warn('Cannot determine the root path to the mono repo');
      return;
    }
github microsoft / react-native-windows / RNWCPP / Scripts / just-task.js View on Github external
task('ts', () => {
    return tscTask({
      pretty: true,
      ...(argv().production && { inlineSources: true, sourceRoot: path.relative(libPath, srcPath) }),
      target: 'es5',
      outDir: 'lib',
      module: 'commonjs',
    });
  });
  task('clean', () => {