Skip to content

Commit

Permalink
chore: show project stats
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 12, 2021
1 parent ef52bc9 commit e4d68f3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- [FAQ](#faq)
- [How is the name written and pronounced?](#how-is-the-name-written-and-pronounced)
- [Why not use Commander.js?](#why-not-use-commanderjs)
- [Project Stats](#project-stats)
- [Contributing](#contributing)
- [Author](#author)

Expand All @@ -76,7 +77,7 @@ Use CAC as simple argument parser:
const cli = require('cac')()

cli.option('--type <type>', 'Choose a project type', {
default: 'node'
default: 'node',
})

const parsed = cli.parse()
Expand All @@ -93,7 +94,7 @@ console.log(JSON.stringify(parsed, null, 2))
const cli = require('cac')()

cli.option('--type [type]', 'Choose a project type', {
default: 'node'
default: 'node',
})
cli.option('--name <name>', 'Provide your name')

Expand Down Expand Up @@ -143,7 +144,7 @@ Options in kebab-case should be referenced in camelCase in your code:
cli
.command('dev', 'Start dev server')
.option('--clear-screen', 'Clear screen')
.action(options => {
.action((options) => {
console.log(options.clearScreen)
})
```
Expand Down Expand Up @@ -223,7 +224,7 @@ cli
.command('build', 'desc')
.option('--env <env>', 'Set envs')
.example('--env.API_SECRET xxx')
.action(options => {
.action((options) => {
console.log(options)
})

Expand Down Expand Up @@ -515,6 +516,10 @@ _And maybe more..._

Basically I made CAC to fulfill my own needs for building CLI apps like [Poi](https://poi.js.org), [SAO](https://saojs.org) and all my CLI apps. It's small, simple but powerful :P

## Project Stats

![Alt](https://repobeats.axiom.co/api/embed/58caf6203631bcdb9bbe22f0728a0af1683dc0bb.svg 'Repobeats analytics image')

## Contributing

1. Fork it!
Expand Down

0 comments on commit e4d68f3

Please sign in to comment.