From e4d68f398a7529a86e9c4027b98601b9a51bac1f Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Fri, 12 Nov 2021 13:22:49 +0800 Subject: [PATCH] chore: show project stats --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2933e4b..7ae2cc8 100644 --- a/README.md +++ b/README.md @@ -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) @@ -76,7 +77,7 @@ Use CAC as simple argument parser: const cli = require('cac')() cli.option('--type ', 'Choose a project type', { - default: 'node' + default: 'node', }) const parsed = cli.parse() @@ -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 ', 'Provide your name') @@ -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) }) ``` @@ -223,7 +224,7 @@ cli .command('build', 'desc') .option('--env ', 'Set envs') .example('--env.API_SECRET xxx') - .action(options => { + .action((options) => { console.log(options) }) @@ -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!