Skip to content

Commit 73ee451

Browse files
chore: drop showcommands (#82)
* refactor: dropping showcommands as per #72 * chore: drop cli-table * refactor: avoid newline character Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
1 parent 49680d6 commit 73ee451

File tree

8 files changed

+30
-120
lines changed

8 files changed

+30
-120
lines changed

__e2e__/__snapshots__/__e2e__/cli.test.js.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Generated by [AVA](https://ava.li).
2626
submit Submits current task␊
2727
fetchtask [key] Fetches any task as per the key supplied␊
2828
showkeys Shows keys of all the completed tasks␊
29-
showcommands Shows all commands available␊
3029
3130
Unknown command junkcmd.␊
3231
`
@@ -45,8 +44,7 @@ Generated by [AVA](https://ava.li).
4544
init Initialize challenges␊
4645
submit Submits current task␊
4746
fetchtask [key] Fetches any task as per the key supplied␊
48-
showkeys Shows keys of all the completed tasks␊
49-
showcommands Shows all commands available`
47+
showkeys Shows keys of all the completed tasks`
5048

5149
## shows help with arg -h
5250

@@ -62,8 +60,7 @@ Generated by [AVA](https://ava.li).
6260
init Initialize challenges␊
6361
submit Submits current task␊
6462
fetchtask [key] Fetches any task as per the key supplied␊
65-
showkeys Shows keys of all the completed tasks␊
66-
showcommands Shows all commands available`
63+
showkeys Shows keys of all the completed tasks`
6764

6865
## shows up help message without any args
6966

@@ -79,8 +76,7 @@ Generated by [AVA](https://ava.li).
7976
init Initialize challenges␊
8077
submit Submits current task␊
8178
fetchtask [key] Fetches any task as per the key supplied␊
82-
showkeys Shows keys of all the completed tasks␊
83-
showcommands Shows all commands available`
79+
showkeys Shows keys of all the completed tasks`
8480

8581
## shows version with arg --version
8682

-19 Bytes
Binary file not shown.

__e2e__/__snapshots__/__e2e__/commands/showcommands.test.js.md

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,36 @@ Generated by [AVA](https://ava.li).
88

99
> Snapshot 1
1010
11-
` _ _ _ ␊
12-
| |_ ___ __ _ ___| |__ ___ ___ __| | ___ ␊
13-
| __/ _ \\/ _` |/ __| '_ \\ / __/ _ \\ / _` |/ _ \\␊
14-
| || __/ (_| | (__| | | | (_| (_) | (_| | __/␊
15-
\\__\\___|\\__,_|\\___|_| |_|\\___\\___/ \\__,_|\\___|␊
16-
␊
17-
 Learn to code effectively Powered by MadHacks␊
11+
`Usage: teachcode <command> [options]␊
1812
13+
Options:␊
14+
-V, --version output the version number␊
15+
-h, --help output usage information␊
1916
20-
User: validConfigJson Progress: 1/30␊
21-
22-
┌───────────────────────────┬───────────────────────────────────────┐␊
23-
│ teachcode init │ Initialize all the tasks │␊
24-
├───────────────────────────┼───────────────────────────────────────┤␊
25-
│ teachcode fetchtask <key> │ Fetch new task providing the key │␊
26-
├───────────────────────────┼───────────────────────────────────────┤␊
27-
│ teachcode submit │ Submits the current file │␊
28-
├───────────────────────────┼───────────────────────────────────────┤␊
29-
│ teachcode showkeys │ View any tasks by grabbing their keys │␊
30-
├───────────────────────────┼───────────────────────────────────────┤␊
31-
│ teachcode showcommands │ Lists all the commands │␊
32-
└───────────────────────────┴───────────────────────────────────────┘`
17+
Commands:␊
18+
init Initialize challenges␊
19+
submit Submits current task␊
20+
fetchtask [key] Fetches any task as per the key supplied␊
21+
showkeys Shows keys of all the completed tasks␊
22+
23+
Unknown command showcommands.␊
24+
`
3325

3426
## no config file for showcommands
3527

3628
> Snapshot 1
3729
38-
` _ _ _ ␊
39-
| |_ ___ __ _ ___| |__ ___ ___ __| | ___ ␊
40-
| __/ _ \\/ _` |/ __| '_ \\ / __/ _ \\ / _` |/ _ \\␊
41-
| || __/ (_| | (__| | | | (_| (_) | (_| | __/␊
42-
\\__\\___|\\__,_|\\___|_| |_|\\___\\___/ \\__,_|\\___|␊
43-
␊
44-
 Learn to code effectively Powered by MadHacks␊
30+
`Usage: teachcode <command> [options]␊
4531
46-
Config file doesn't exist!␊
32+
Options:␊
33+
-V, --version output the version number␊
34+
-h, --help output usage information␊
4735
36+
Commands:␊
37+
init Initialize challenges␊
38+
submit Submits current task␊
39+
fetchtask [key] Fetches any task as per the key supplied␊
40+
showkeys Shows keys of all the completed tasks␊
41+
42+
Unknown command showcommands.␊
4843
`
-245 Bytes
Binary file not shown.

bin/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const { version } = require('../package');
1010

1111
const initTasks = require('../src/commands/init');
1212
const fetchTask = require('../src/commands/tasks');
13-
const showCommands = require('../src/commands/commands');
1413
const showKeys = require('../src/commands/keys');
1514
const submitTask = require('../src/commands/submit');
1615

@@ -40,11 +39,6 @@ program
4039
.description('Shows keys of all the completed tasks')
4140
.action(showKeys);
4241

43-
program
44-
.command('showcommands')
45-
.description('Shows all commands available')
46-
.action(showCommands);
47-
4842
const suggestCommands = cmd => {
4943
const availableCommands = program.commands.map(c => c._name);
5044

package-lock.json

Lines changed: 2 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,13 @@
4949
"dependencies": {
5050
"axios": "^0.19.0",
5151
"chalk": "^2.4.1",
52-
"cli-table3": "^0.5.1",
5352
"commander": "^2.18.0",
5453
"didyoumean": "^1.2.1",
5554
"execa": "^1.0.0",
5655
"inquirer": "^6.2.0",
5756
"node-banner": "^1.3.2",
58-
"python-shell": "^1.0.7",
59-
"open": "^7.0.0"
57+
"open": "^7.0.0",
58+
"python-shell": "^1.0.7"
6059
},
6160
"devDependencies": {
6261
"@commitlint/cli": "^8.2.0",

src/commands/commands.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)