How to use the just-task.option 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
const { task, option, logger, argv, series, condition } = require('just-task');
const path = require('path')
const build = require('./scripts/build')
const download = require('./scripts/download')
const cleanup = require('./scripts/cleanup')
const {getArgvFromNpmEnv, getArgvFromPkgJson} = require('./scripts/npm_argv')

option('electron_version', {default: '5.0.8'});
option('runtime', {default: 'electron', choices: ['electron', 'node']});
option('platform', {default: process.platform, choices: ['darwin', 'win32']});
// option('packageVersion');
option('debug', {default: false, boolean: true});
option('silent', {default: false, boolean: true});
option('msvs_version', {default: '2015'});

const packageVersion = require('./package.json').version;

// npm run build:electron -- 
task('build:electron', () => {
  build({
    electronVersion: argv().electron_version, 
    runtime: argv().runtime, 
    platform: argv().platform, 
    packageVersion, 
    debug: argv().debug,
github OfficeDev / office-ui-fabric-react / scripts / just-task.js View on Github external
const bundleSizeCollect = require('./tasks/bundle-size-collect');
const checkForModifiedFiles = require('./tasks/check-for-modified-files');
const generateVersionFiles = require('./tasks/generate-version-files');
const perfTest = require('./tasks/perf-test');

let packageJson;

option('production');

// Adds an alias for 'npm-install-mode' for backwards compatibility
option('min', { alias: 'npm-install-mode' });

option('webpackConfig', { alias: 'w' });

// Build only commonjs (not other TS variants) but still run other tasks
option('commonjs');

registerTask('clean', clean);
registerTask('copy', copy);
registerTask('jest', jest);
registerTask('jest-watch', jestWatch);
registerTask('sass', sass);
registerTask('ts:commonjs', ts.commonjs);
registerTask('ts:esm', ts.esm);
registerTask('ts:amd', ts.amd);
registerTask('tslint', tslint);
registerTask('ts:commonjs-only', ts.commonjsOnly);
registerTask('webpack', webpack);
registerTask('webpack-dev-server', webpackDevServer);
registerTask('verify-api-extractor', verifyApiExtractor);
registerTask('update-api-extractor', updateApiExtractor);
registerTask('lint-imports', lintImports);
github AgoraIO / Electron-SDK / just-task.js View on Github external
const { task, option, logger, argv, series, condition } = require('just-task');
const path = require('path')
const build = require('./scripts/build')
const download = require('./scripts/download')
const cleanup = require('./scripts/cleanup')
const {getArgvFromNpmEnv, getArgvFromPkgJson} = require('./scripts/npm_argv')

option('electron_version', {default: '5.0.8'});
option('runtime', {default: 'electron', choices: ['electron', 'node']});
option('platform', {default: process.platform, choices: ['darwin', 'win32']});
// option('packageVersion');
option('debug', {default: false, boolean: true});
option('silent', {default: false, boolean: true});
option('msvs_version', {default: '2015'});

const packageVersion = require('./package.json').version;

// npm run build:electron -- 
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
  })
})
github AgoraIO / Electron-SDK / just-task.js View on Github external
const { task, option, logger, argv, series, condition } = require('just-task');
const path = require('path')
const build = require('./scripts/build')
const download = require('./scripts/download')
const cleanup = require('./scripts/cleanup')
const {getArgvFromNpmEnv, getArgvFromPkgJson} = require('./scripts/npm_argv')

option('electron_version', {default: '5.0.8'});
option('runtime', {default: 'electron', choices: ['electron', 'node']});
option('platform', {default: process.platform, choices: ['darwin', 'win32']});
// option('packageVersion');
option('debug', {default: false, boolean: true});
option('silent', {default: false, boolean: true});
option('msvs_version', {default: '2015'});

const packageVersion = require('./package.json').version;

// npm run build:electron -- 
task('build:electron', () => {
  build({
    electronVersion: argv().electron_version, 
    runtime: argv().runtime, 
    platform: argv().platform, 
    packageVersion, 
    debug: argv().debug, 
    silent: argv().silent,
github microsoft / react-native-windows / RNWCPP / Scripts / just-task.js View on Github external
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// @ts-check

const path = require('path');
const { task, series, condition, option, argv } = require('just-task');
const { tscTask, tslintTask, cleanTask } = require('just-scripts');
const libPath = path.resolve(process.cwd(), 'lib');
const srcPath = path.resolve(process.cwd(), 'src');

if (require('fs').existsSync(path.resolve(__dirname, '../../../scripts/just-task.js'))) {
  require('../../../scripts/just-task')
} else {

  option('production');
  option('clean');

  task('tslint', () => {
    return tslintTask();
  });
  task('ts', () => {
    return tscTask({
      pretty: true,
      ...(argv().production && { inlineSources: true, sourceRoot: path.relative(libPath, srcPath) }),
      target: 'es5',
      outDir: 'lib',
      module: 'commonjs',
    });
  });
  task('clean', () => {
    return cleanTask(['lib', 'temp', 'dist', 'coverage'].map(p => path.join(process.cwd(), p)));
  });
github AgoraIO / Electron-SDK / just-task.js View on Github external
const { task, option, logger, argv, series, condition } = require('just-task');
const path = require('path')
const build = require('./scripts/build')
const download = require('./scripts/download')
const cleanup = require('./scripts/cleanup')
const {getArgvFromNpmEnv, getArgvFromPkgJson} = require('./scripts/npm_argv')

option('electron_version', {default: '5.0.8'});
option('runtime', {default: 'electron', choices: ['electron', 'node']});
option('platform', {default: process.platform, choices: ['darwin', 'win32']});
// option('packageVersion');
option('debug', {default: false, boolean: true});
option('silent', {default: false, boolean: true});
option('msvs_version', {default: '2015'});

const packageVersion = require('./package.json').version;

// npm run build:electron -- 
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
const { task, option, logger, argv, series, condition } = require('just-task');
const path = require('path')
const build = require('./scripts/build')
const download = require('./scripts/download')
const cleanup = require('./scripts/cleanup')
const {getArgvFromNpmEnv, getArgvFromPkgJson} = require('./scripts/npm_argv')

option('electron_version', {default: '5.0.8'});
option('runtime', {default: 'electron', choices: ['electron', 'node']});
option('platform', {default: process.platform, choices: ['darwin', 'win32']});
// option('packageVersion');
option('debug', {default: false, boolean: true});
option('silent', {default: false, boolean: true});
option('msvs_version', {default: '2015'});

const packageVersion = require('./package.json').version;

// npm run build:electron -- 
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
  })
github microsoft / just / packages / just-scripts / src / task-presets / monorepo.ts View on Github external
export function monorepo() {
  option('cwd');
  option('name', { alias: 'n' });
  option('stack', { alias: 's' });
  option('latest');
  task('add-package', 'adds a package to the monorepo', addPackageTask);
  task('upgrade-repo', 'upgrades packages inside the monorepo according to the just-stack template', upgradeRepoTask);
}
github microsoft / just / packages / just-scripts / src / task-presets / monorepo.ts View on Github external
export function monorepo() {
  option('cwd');
  option('name', { alias: 'n' });
  option('stack', { alias: 's' });
  option('latest');
  task('add-package', 'adds a package to the monorepo', addPackageTask);
  task('upgrade-repo', 'upgrades packages inside the monorepo according to the just-stack template', upgradeRepoTask);
}
github microsoft / just / packages / just-scripts / src / task-presets / monorepo.ts View on Github external
export function monorepo() {
  option('cwd');
  option('name', { alias: 'n' });
  option('stack', { alias: 's' });
  option('latest');
  task('add-package', 'adds a package to the monorepo', addPackageTask);
  task('upgrade-repo', 'upgrades packages inside the monorepo according to the just-stack template', upgradeRepoTask);
}