Lines Matching refs:yargs

2   <img width="250" src="https://raw.githubusercontent.com/yargs/yargs/main/yargs-logo.png">
11 ![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg)
48 npm i yargs
53 npm i yargs@next
62 const yargs = require('yargs/yargs')
63 const { hideBin } = require('yargs/helpers')
64 const argv = yargs(hideBin(process.argv)).argv
87 const yargs = require('yargs/yargs')
88 const { hideBin } = require('yargs/helpers')
90 yargs(hideBin(process.argv))
91 .command('serve [port]', 'start the server', (yargs) => {
92 return yargs
115 yargs has type definitions at [@types/yargs][type-definitions].
118 npm i @types/yargs --save-dev
125 As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno):
128 import yargs from 'https://deno.land/x/yargs/deno.ts'
129 import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts'
131 yargs(Deno.args)
132 .command('download <files...>', 'download a list of files', (yargs: any) => {
133 return yargs.positional('files', {
146 As of `v16`,`yargs` supports ESM imports:
149 import yargs from 'yargs'
150 import { hideBin } from 'yargs/helpers'
152 yargs(hideBin(process.argv))
162 See examples of using yargs in the browser in [docs](/docs/browser.md).
185 * [Bundling yargs](/docs/bundling.md)
194 [npm-url]: https://www.npmjs.com/package/yargs
195 [npm-image]: https://img.shields.io/npm/v/yargs.svg
202 [type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
203 [coverage-image]: https://img.shields.io/nycrc/yargs/yargs
204 [coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc