Skip to content

Commit 3cc61d2

Browse files
committed
📦 NEW: Alias
1 parent 26dfb62 commit 3cc61d2

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

readme.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Track the Coronavirus disease (COVID-19) or the Novel Coronavirus Strain.
1616
# corona-cli
1717

1818
- 🚀 Get worldwide Coronavirus disease (COVID-19) reporting
19-
- 🤯 Daily reporting of your country's COVID-19 data
19+
- 🤯 Active daily reporting of your country's COVID-19 statistics
20+
- 🗃️ Data: Country, Cases, Deaths, Recovered, Active, Critical, Per Million
2021

2122
<br>
2223

@@ -25,11 +26,11 @@ Track the Coronavirus disease (COVID-19) or the Novel Coronavirus Strain.
2526
## Install
2627

2728
```sh
28-
# Run directly with npx.
29-
npx corona-cli
30-
31-
# OR Install globally.
29+
# Install globally (recommended).
3230
npm install -g corona-cli
31+
32+
# Or run directly with npx (installs CLI on every run).
33+
npx corona-cli
3334
```
3435

3536
<br>
@@ -40,25 +41,25 @@ npm install -g corona-cli
4041

4142
```sh
4243
# Display data for all countries.
43-
npx corona-cli
44+
corona
4445

4546
# Display data for all countries in single color.
46-
npx corona-cli --xcolor
47+
corona --xcolor
4748

48-
# Display data for all countries in single color.
49-
npx corona-cli -x
49+
# Alias: Display data for all countries in single color.
50+
corona -x
5051

5152
# Display data for given country.
52-
npx corona-cli country
53+
corona <countryName>
5354

5455
# Display data for given country i.e. China.
55-
npx corona-cli china
56+
corona china
5657

5758
# Display data for given country i.e. USA.
58-
npx corona-cli usa
59+
corona usa
5960

60-
# Display data for given country.
61-
npx corona-cli --help
61+
# Display the help data.
62+
corona --help
6263
```
6364

6465
<br>

utils/cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const dim = chalk.dim;
88
module.exports = meow(
99
`
1010
Usage
11-
${green(`npx corona-cli`)} ${cyan(`<command>`)} ${yellow(`[--option]`)}
11+
${green(`corona`)} ${cyan(`<command>`)} ${yellow(`[--option]`)}
1212
1313
Commands
1414
${cyan(`country-name`)} Get data for a given country
@@ -17,11 +17,11 @@ module.exports = meow(
1717
${yellow(`--xcolor`)}, ${yellow(`-x`)} Single colored output
1818
1919
Examples
20-
${green(`npx corona-cli`)} ${cyan(`china`)}
21-
${green(`npx corona-cli`)} ${yellow(`-x`)}
20+
${green(`corona`)} ${cyan(`china`)}
21+
${green(`corona`)} ${yellow(`-x`)}
2222
2323
❯ You can also run command + option at once:
24-
${green(`npx corona-cli`)} ${cyan(`china`)} ${yellow(`-x`)}
24+
${green(`corona`)} ${cyan(`china`)} ${yellow(`-x`)}
2525
`,
2626
{
2727
booleanDefault: undefined,

0 commit comments

Comments
 (0)