Promise .all([ argv.prod && cleanJS(), setupRepo(), setupNode(), setupTest262() ]) .then(() => runTests()) .then(() => runTests(true))
/** * Returns a parsed array of CLI arguments and options * * @since 3.0.0 * @alias lando.cli.argv * @return {Object} Yarg parsed options * @example * const argv = lando.cli.argv(); * @todo make this static and then fix all call sites */ argv() { return require('yargs').help(false).version(false).argv; }
async function main() { const argv = require('yargs').argv; process.chdir(appDir); console.info(`Running from: ${process.cwd()}`); const version = (await execCommand('npm version patch')).trim(); const tagName = version; console.info(`New version number: ${version}`); console.info(await execCommand('git add -A')); console.info(await execCommand(`git commit -m "Electron release ${version}"`)); console.info(await execCommand(`git tag ${tagName}`)); console.info(await execCommand('git push && git push --tags')); const releaseOptions = { isDraft: true, isPreRelease: !!argv.beta }; console.info('Release options: ', releaseOptions); const release = await githubRelease('joplin', tagName, releaseOptions); console.info(`Created GitHub release: ${release.html_url}`); console.info('GitHub release page: https://github.com/laurent22/joplin/releases'); console.info(`To create changelog: node Tools/git-changelog.js ${version}`); }
async function main() { const argv = require('yargs').argv; if (!argv._.length) throw new Error('Tag name must be specified. Provide the tag of the new version and git-changelog will walk backward to find the changes to the previous relevant tag.'); const fromTagName = argv._[0]; let toTagName = argv._.length >= 2 ? argv._[1] : '';
const processParamHandler = (browser) => { const theme = argv.t || argv.theme; if(theme && themes[theme]) { browser.webContents.send(themes[theme]); const lang = argv.l || argv.lang; if(lang && langs[lang]) { browser.webContents.send('application:prompt-language', langs[lang]); const mode = argv.m || argv.mode; if(mode && modes[mode]) { browser.webContents.send('application:prompt-mode', modes[mode]); const editor = argv.e || argv.editor; if(editor && editors[editor]) { browser.webContents.send('application:editor-mode', editors[editor]); const script = argv.s || argv.script; if(script) { browser.webContents.send('application:load-file', script); const session = argv.i || argv.import || argv.session; if(session) { browser.webContents.send('application:import-file', session); const p = argv.p || argv.path; if(p) { browser.webContents.send('application:add-path', p.split(path.delimiter));
yargonaut.style('green').errorsStyle('red'); const yargs = require('yargs'); const {clear, channel, experimental, secretToggle} = yargs.argv;
async function main() { const argv = require('yargs').argv; const isPreRelease = !!argv.prerelease;
function error(e, msg) { out.error(argv.debug ? e : msg); process.exit(1); }
.command("build [configPath]", "Build project", (yarg) => { return yarg .positional("configPath", { type: "string", default: process.cwd(), describe: "The path where expressvue.config.js lives", }) .coerce("configPath", (arg) => { return path.join(process.cwd(), arg); }) .option("verbose", { alias: "v", default: false, .help()
const hasDescriptions = descriptionsKeys.length > 0 && descriptionsKeys.some(key => scripts[key]); const shouldWarnNoDescriptions = argv.descriptions && !hasDescriptions; if (shouldWarnNoDescriptions) { out.warn(`No descriptions for your ${runner} scripts found`); .map(key => ({ name: argv.info || argv.descriptions ? getLongName( key, argv.descriptions && descriptions[key] ? descriptions[key] : scripts[key] argv.all ? true : ["pre", "post"].every(prefix => !item.value.startsWith(prefix)) item => (argv.descriptionsOnly ? descriptions[item.value] : true) !argv.exclude || !argv.exclude.some(e => new RegExp(e + (e.includes("*") ? "" : "$"), "i").test(item.value)
.usage('$0 <cmd> [args]') .command('new <model_file> <name> [-t tags]]', 'Upload and publish a tflite model', (yargs) => { yargs.positional('model_file', { describe: 'Path to a tflite model', type: 'string' }); yargs.positional('name', { describe: 'Display name for the model', type: 'string' }); yargs.option('tags', { alias: 't', demandOption: false, }, (argv) => { (async () => { const tags = argv.tags == null ? null : argv.tags.split(','); await uploadModel(argv.model_file, argv.name, tags); process.exit(); })().catch(e => { }); }) .command('list [-f filter-exp]', 'List the models in your project.\n\nFor information about the ' + 'filter language, see\n' + 'https://firebase.google.com/docs/ml-kit/manage-hosted-models#list_your_projects_models',
gulp.task('compile-js', function () { return gulp.src(Settings.js.source + '/' + Settings.js.sourceFile) .pipe(browserify({ insertGlobals : true, debug : !argv.p })) .pipe(rename(Settings.js.outputFile)) .pipe(gulp.dest(Settings.js.static)); });
function finishLocal(err,result) { if (argv.zip) { // create archive var zip = new admzip(); // add files directly for (let f in zipFiles) { zip.addFile(f, new Buffer(zipFiles[f]), 'Created with OpenAPI-CodeGen'); } // write everything to disk zip.writeZip(path.join(config.outputDir,configName+'.zip')); } }
.usage('$0 <cmd> [args]') .command('new <model_file> <name> [-t tags]]', 'Upload and publish a tflite model', (yargs) => { yargs.positional('model_file', { describe: 'Path to a tflite model', type: 'string' }); yargs.positional('name', { describe: 'Display name for the model', type: 'string' }); yargs.option('tags', { alias: 't', demandOption: false, }, (argv) => { (async () => { const tags = argv.tags == null ? null : argv.tags.split(','); await uploadModel(argv.model_file, argv.name, tags); process.exit(); })().catch(e => { }); }) .command('list [-f filter-exp]', 'List the models in your project.\n\nFor information about the ' + 'filter language, see\n' + 'https://firebase.google.com/docs/ml-kit/manage-hosted-models#list_your_projects_models',