4.7.84 • Published 10 months ago

@taktikorg/accusamus-quod-debitis v4.7.84

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

ci NPM version js-standard-style Coverage Conventional Commits Slack

Description

Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.

It gives you:

  • commands and (grouped) options (my-program.js serve --port=5000).
  • a dynamically generated help menu based on your arguments:
mocha [spec..]

Run tests with Mocha

Commands
  mocha inspect [spec..]  Run tests with Mocha                         [default]
  mocha init <path>       create a client-side Mocha setup at <path>

Rules & Behavior
  --allow-uncaught           Allow uncaught errors to propagate        [boolean]
  --async-only, -A           Require all tests to use a callback (async) or
                             return a Promise                          [boolean]
  • bash-completion shortcuts for commands and options.
  • and tons more.

Installation

Stable version:

npm i @taktikorg/accusamus-quod-debitis

Bleeding edge version with the most recent features:

npm i @taktikorg/accusamus-quod-debitis@next

Usage

Simple Example

#!/usr/bin/env node
const @taktikorg/accusamus-quod-debitis = require('@taktikorg/accusamus-quod-debitis/@taktikorg/accusamus-quod-debitis')
const { hideBin } = require('@taktikorg/accusamus-quod-debitis/helpers')
const argv = @taktikorg/accusamus-quod-debitis(hideBin(process.argv)).parse()

if (argv.ships > 3 && argv.distance < 53.5) {
  console.log('Plunder more riffiwobbles!')
} else {
  console.log('Retreat from the xupptumblers!')
}
$ ./plunder.js --ships=4 --distance=22
Plunder more riffiwobbles!

$ ./plunder.js --ships 12 --distance 98.7
Retreat from the xupptumblers!

Note: hideBin is a shorthand for process.argv.slice(2). It has the benefit that it takes into account variations in some environments, e.g., Electron.

Complex Example

#!/usr/bin/env node
const @taktikorg/accusamus-quod-debitis = require('@taktikorg/accusamus-quod-debitis/@taktikorg/accusamus-quod-debitis')
const { hideBin } = require('@taktikorg/accusamus-quod-debitis/helpers')

@taktikorg/accusamus-quod-debitis(hideBin(process.argv))
  .command('serve [port]', 'start the server', (@taktikorg/accusamus-quod-debitis) => {
    return @taktikorg/accusamus-quod-debitis
      .positional('port', {
        describe: 'port to bind on',
        default: 5000
      })
  }, (argv) => {
    if (argv.verbose) console.info(`start server on :${argv.port}`)
    serve(argv.port)
  })
  .option('verbose', {
    alias: 'v',
    type: 'boolean',
    description: 'Run with verbose logging'
  })
  .parse()

Run the example above with --help to see the help for the application.

Supported Platforms

TypeScript

@taktikorg/accusamus-quod-debitis has type definitions at @types/@taktikorg/accusamus-quod-debitis.

npm i @types/@taktikorg/accusamus-quod-debitis --save-dev

See usage examples in docs.

Deno

As of v16, @taktikorg/accusamus-quod-debitis supports Deno:

import @taktikorg/accusamus-quod-debitis from 'https://deno.land/x/@taktikorg/accusamus-quod-debitis/deno.ts'
import { Arguments } from 'https://deno.land/x/@taktikorg/accusamus-quod-debitis/deno-types.ts'

@taktikorg/accusamus-quod-debitis(Deno.args)
  .command('download <files...>', 'download a list of files', (@taktikorg/accusamus-quod-debitis: any) => {
    return @taktikorg/accusamus-quod-debitis.positional('files', {
      describe: 'a list of files to do something with'
    })
  }, (argv: Arguments) => {
    console.info(argv)
  })
  .strictCommands()
  .demandCommand(1)
  .parse()

ESM

As of v16,@taktikorg/accusamus-quod-debitis supports ESM imports:

import @taktikorg/accusamus-quod-debitis from '@taktikorg/accusamus-quod-debitis'
import { hideBin } from '@taktikorg/accusamus-quod-debitis/helpers'

@taktikorg/accusamus-quod-debitis(hideBin(process.argv))
  .command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => {
    console.info(argv)
  })
  .demandCommand(1)
  .parse()

Usage in Browser

See examples of using @taktikorg/accusamus-quod-debitis in the browser in docs.

Community

Having problems? want to contribute? join our community slack.

Documentation

Table of Contents

Supported Node.js Versions

Libraries in this ecosystem make a best effort to track Node.js' release schedule. Here's a post on why we think this is important.

escapereduxvalidatoreventsxhremitRegExp.prototype.flagsObject.assignfluxes2017nativesetPrototypeOfperformantfastreadablestreamiamjwtclassnamesbootstrap lessclonetypedarraycollectionString.prototype.matchAllquoteflagsbufferselfponyfillec2requiresymlinksvaluesjsdomimmutablecolourECMAScript 2016ramdamobilefile systemmacosstylesheetslotoperating-systemstarterpersistentroutingdeletemixinsecmascriptencryptionfileexit-codetranspileurlframerdeep-cloneObservablesstatelesspackagesloadingassertionlintmaptypanioneventEmittercommand-lineelmdataviewoutputWebSocketqueueMicrotaskarraybufferquerystringFunction.prototype.namesetECMAScript 2017computed-typesmodulesa11ymapreducees2018varsES2020asciiECMAScript 2018configurabletranspilerrulesanimationgetoptfromstyleslesscssawesomesaucecore-jsRegExp#flagsescodesmovepackage managerbinaryschemeexecfiledayjssymlinkreal-timehookslocales7superstructsuperagentletCSSStyleDeclarationsomecss lessArraymoduleglacierfast-deep-clonetypeerrorES2016has-owntsconsolevisualspinnerprettyfullwidthexpressioncopyxtermforEachBigInt64Arrayfantasy-landfastclonepostcss-pluginqsbindwgetcolorflatInt16ArrayregexpobjectexpressapiECMAScript 2022boundmkdirpRxarktypegradients css3dirSystem.globalminimaltimeintrinsiczodpopmotionprotobufgroupconcatcallfast-copyfilterinternal slotes6resolveObject.entriescolumnprefixiseslintInt32Arraysortglobal objectES3global this valuedatedragjson-schemautil.inspectwidthprotologjapaneseregexlazytddlrujsonl10nenvqueuetoArraycollection.es6monorepouninstallhandlerstrimRightruntimeebslanguageisConcatSpreadablebcrypttacitio-tscompilerpatchcompile lesssignalsinstallweaksetless compilerObject.fromEntriesstylingcloudwatchwafclassesloadbalancingArray.prototype.findLastform-validationObjectdeepclonelibphonenumbercloudtrailidleECMAScript 2020optionobjlivecss variablevalidationvaluetelephoneString.prototype.trimhardlinkstesterhelperslinuxclientbundleraccessibilitycolorseffect-tssyntaxerrorestreeES2021importArrayBuffergroupBy$.extendstatusgesturesregularviewweakmapcall-bindnpmignoreECMAScript 7httpcertificatesmkdirslistenersrandomairbnbfigletconcatMapdataViewclassnameloggingfppropsharedextrainterruptsmatchAllObject.definePropertycharacterpackage.jsonnpmsortedreusepredictableeverybinariesRFC-6455protocol-buffersSymbol.toStringTagjsonschemaequalityES2018globalscss nestingnodejssequencetoReversedArray.prototype.flatMaphotautoprefixerflatMapnodeeslint-plugindynamodbreadableglobalThisworkspace:*StreamendpointbyteLengthbannercreateWebSocketsstringifybundlingmake direxecuteCSSimmerfnmatchnameStreamsprototypereducergitignoreassertsequalfull-widthcommandroute53inputthreees5flattenUint8ArrayUint32ArrayrangeerrorbytesnskeysuploadpostcssnumberObject.getPrototypeOfi18ncoerciblefssymbolstrimLeftObject.valuestoSortedsidelockfileinferencecloudfrontUint8ClampedArraydefinePropertypropertystringifierpinosigtermtypevariables in cssRxJStypedECMAScript 3deterministiceslintpluginjsWeakSetdeepcopyjavascriptomitcloudformation3dpushstring.envschemahasOwnfindLastinspectstablebusyrfc9562optimizerformESnextmulti-packagecssshimwritechromiumnamestoolkitbrowserlistPushtoobjectgetterspringentriesspecArrayBuffer#sliceformatfastifyunicodeforkenvironmentseast-asian-widthfindharmonyargsemrJSON-Schemaloggerindicatorprocessredactsafe@@toStringTagacornpasswordgradients cssspeeddatastyled-componentsefficientMicrosoftoffsetdirectorygdprcurriedURLstructuredCloneassertparsingglobroute_.extendrfc4122variablescallbackiterationbeanstalkkinesiselectronfixed-widthdomremovesubprocessvalidatereact poseconstECMAScript 2015spawnArrayBuffer.prototype.slicechannelECMAScriptpyyaml[[Prototype]]opensslTypedArrayObservablejoiplugininvariant
4.7.84

10 months ago

4.7.83

10 months ago

4.7.82

10 months ago

4.6.82

10 months ago

4.6.81

10 months ago

4.6.80

11 months ago

4.6.79

11 months ago

4.6.78

11 months ago

3.6.78

11 months ago

3.6.77

11 months ago

3.6.76

11 months ago

3.6.75

11 months ago

3.6.74

11 months ago

3.6.73

11 months ago

3.6.72

11 months ago

3.6.71

11 months ago

3.6.70

11 months ago

3.6.69

11 months ago

3.6.68

11 months ago

3.5.68

11 months ago

3.5.67

11 months ago

3.5.66

11 months ago

3.5.65

11 months ago

3.5.64

11 months ago

3.5.63

11 months ago

3.5.62

11 months ago

3.5.61

11 months ago

3.5.60

11 months ago

3.5.59

11 months ago

3.5.58

11 months ago

3.5.57

11 months ago

3.5.56

11 months ago

3.5.55

11 months ago

3.5.54

11 months ago

3.5.53

11 months ago

3.5.52

12 months ago

3.5.51

12 months ago

3.4.51

12 months ago

3.4.50

12 months ago

3.4.49

12 months ago

3.4.48

12 months ago

3.3.48

12 months ago

3.3.47

12 months ago

3.2.47

12 months ago

3.2.46

12 months ago

3.2.45

12 months ago

3.2.44

12 months ago

3.2.43

12 months ago

3.2.42

12 months ago

3.2.41

12 months ago

3.2.40

12 months ago

2.2.40

12 months ago

2.2.39

12 months ago

2.2.38

12 months ago

2.2.37

12 months ago

2.2.36

1 year ago

2.2.35

1 year ago

2.2.34

1 year ago

2.2.33

1 year ago

2.2.32

1 year ago

2.2.31

1 year ago

2.2.30

1 year ago

2.2.29

1 year ago

2.2.28

1 year ago

2.2.27

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.2.24

1 year ago

2.2.23

1 year ago

2.2.22

1 year ago

1.2.22

1 year ago

1.2.21

1 year ago

1.2.20

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago