How to use the @oclif/parser.parse function in @oclif/parser

To help you get started, we’ve selected a few @oclif/parser 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 netlify / cli / src / utils / command.js View on Github external
}
    }
    if (!opts.flags.auth) {
      globalFlags['auth'] = {
        parse: (b, _) => b,
        description: 'Netlify auth token',
        input: [],
        multiple: false,
        type: 'option'
      }
    }

    // enrich with flags here
    opts.flags = Object.assign({}, opts.flags, globalFlags)

    return require('@oclif/parser').parse(
      argv,
      Object.assign(
        {},
        {
          context: this
        },
        opts
      )
    )
  }

@oclif/parser

arg and flag parser for oclif

MIT
Latest version published 9 months ago

Package Health Score

53 / 100
Full package analysis