Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/yargs/README.md

    r59329aa re29cc2e  
    11<p align="center">
    2   <img width="250" src="https://raw.githubusercontent.com/yargs/yargs/main/yargs-logo.png">
     2  <img width="250" src="/yargs-logo.png">
    33</p>
    44<h1 align="center"> Yargs </h1>
     
    66  <b >Yargs be a node.js library fer hearties tryin' ter parse optstrings</b>
    77</p>
    8 
    98<br>
    109
    11 ![ci](https://github.com/yargs/yargs/workflows/ci/badge.svg)
     10[![Build Status][travis-image]][travis-url]
     11[![Coverage Status][coveralls-image]][coveralls-url]
    1212[![NPM version][npm-image]][npm-url]
    1313[![js-standard-style][standard-image]][standard-url]
    14 [![Coverage][coverage-image]][coverage-url]
    1514[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
    1615[![Slack][slack-image]][slack-url]
    1716
    18 ## Description
    19 Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface.
     17## Description :
     18Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. 
    2019
    2120It gives you:
    2221
    2322* commands and (grouped) options (`my-program.js serve --port=5000`).
    24 * a dynamically generated help menu based on your arguments:
     23* a dynamically generated help menu based on your arguments.
    2524
    26 ```
    27 mocha [spec..]
    28 
    29 Run tests with Mocha
    30 
    31 Commands
    32   mocha inspect [spec..]  Run tests with Mocha                         [default]
    33   mocha init <path>       create a client-side Mocha setup at <path>
    34 
    35 Rules & Behavior
    36   --allow-uncaught           Allow uncaught errors to propagate        [boolean]
    37   --async-only, -A           Require all tests to use a callback (async) or
    38                              return a Promise                          [boolean]
    39 ```
     25> <img width="400" src="/screen.png">
    4026
    4127* bash-completion shortcuts for commands and options.
     
    5440```
    5541
    56 ## Usage
     42## Usage :
    5743
    5844### Simple Example
    5945
    60 ```javascript
     46````javascript
    6147#!/usr/bin/env node
    62 const yargs = require('yargs/yargs')
    63 const { hideBin } = require('yargs/helpers')
    64 const argv = yargs(hideBin(process.argv)).argv
     48const argv = require('yargs').argv
    6549
    6650if (argv.ships > 3 && argv.distance < 53.5) {
     
    6953  console.log('Retreat from the xupptumblers!')
    7054}
    71 ```
     55````
    7256
    7357```bash
     
    7963```
    8064
    81 > Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690).
    82 
    8365### Complex Example
    8466
    8567```javascript
    8668#!/usr/bin/env node
    87 const yargs = require('yargs/yargs')
    88 const { hideBin } = require('yargs/helpers')
    89 
    90 yargs(hideBin(process.argv))
     69require('yargs') // eslint-disable-line
    9170  .command('serve [port]', 'start the server', (yargs) => {
    92     return yargs
     71    yargs
    9372      .positional('port', {
    9473        describe: 'port to bind on',
     
    10180  .option('verbose', {
    10281    alias: 'v',
    103     type: 'boolean',
    104     description: 'Run with verbose logging'
     82    default: false
    10583  })
    106   .parse()
     84  .argv
    10785```
    10886
    10987Run the example above with `--help` to see the help for the application.
    11088
    111 ## Supported Platforms
    112 
    113 ### TypeScript
    114 
    115 yargs has type definitions at [@types/yargs][type-definitions].
    116 
    117 ```
    118 npm i @types/yargs --save-dev
    119 ```
    120 
    121 See usage examples in [docs](/docs/typescript.md).
    122 
    123 ### Deno
    124 
    125 As of `v16`, `yargs` supports [Deno](https://github.com/denoland/deno):
    126 
    127 ```typescript
    128 import yargs from 'https://deno.land/x/yargs/deno.ts'
    129 import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts'
    130 
    131 yargs(Deno.args)
    132   .command('download <files...>', 'download a list of files', (yargs: any) => {
    133     return yargs.positional('files', {
    134       describe: 'a list of files to do something with'
    135     })
    136   }, (argv: Arguments) => {
    137     console.info(argv)
    138   })
    139   .strictCommands()
    140   .demandCommand(1)
    141   .parse()
    142 ```
    143 
    144 ### ESM
    145 
    146 As of `v16`,`yargs` supports ESM imports:
    147 
    148 ```js
    149 import yargs from 'yargs'
    150 import { hideBin } from 'yargs/helpers'
    151 
    152 yargs(hideBin(process.argv))
    153   .command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => {
    154     console.info(argv)
    155   })
    156   .demandCommand(1)
    157   .parse()
    158 ```
    159 
    160 ### Usage in Browser
    161 
    162 See examples of using yargs in the browser in [docs](/docs/browser.md).
    163 
    164 ## Community
     89## Community :
    16590
    16691Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com).
    16792
    168 ## Documentation
     93## Documentation :
    16994
    17095### Table of Contents
     
    178103  * [Arrays](/docs/tricks.md#arrays)
    179104  * [Objects](/docs/tricks.md#objects)
    180   * [Quotes](/docs/tricks.md#quotes)
    181105* [Advanced Topics](/docs/advanced.md)
    182106  * [Composing Your App Using Commands](/docs/advanced.md#commands)
    183107  * [Building Configurable CLI Apps](/docs/advanced.md#configuration)
    184108  * [Customizing Yargs' Parser](/docs/advanced.md#customizing)
    185   * [Bundling yargs](/docs/bundling.md)
    186109* [Contributing](/contributing.md)
    187110
    188 ## Supported Node.js Versions
    189 
    190 Libraries in this ecosystem make a best effort to track
    191 [Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
    192 post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
    193 
     111[travis-url]: https://travis-ci.org/yargs/yargs
     112[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg
     113[coveralls-url]: https://coveralls.io/github/yargs/yargs
     114[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg
    194115[npm-url]: https://www.npmjs.com/package/yargs
    195116[npm-image]: https://img.shields.io/npm/v/yargs.svg
     
    200121[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
    201122[slack-url]: http://devtoolscommunity.herokuapp.com
    202 [type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/main/types/yargs
    203 [coverage-image]: https://img.shields.io/nycrc/yargs/yargs
    204 [coverage-url]: https://github.com/yargs/yargs/blob/main/.nycrc
Note: See TracChangeset for help on using the changeset viewer.