File tree Expand file tree Collapse file tree 6 files changed +70
-3
lines changed Expand file tree Collapse file tree 6 files changed +70
-3
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- console . log ( "TBD" ) ;
3+ require ( '../lib/cli' ) ;
Original file line number Diff line number Diff line change 1+ var yargs = require ( 'yargs' ) ;
2+
3+ yargs . commandDir ( 'commands' )
4+ . help ( )
5+ . strict ( )
6+ . argv ;
Original file line number Diff line number Diff line change 1+ var cmd = {
2+ command : 'list [--cached|-c] [--undone|-D]' ,
3+ desc : 'List all problems' ,
4+ builder : {
5+ cached : {
6+ alias : 'c' ,
7+ describe : 'List cached problems.'
8+ } ,
9+ undone : {
10+ alias : 'D' ,
11+ describe : 'List undone problems.'
12+ }
13+ }
14+ } ;
15+
16+ cmd . handler = function ( argv ) {
17+ // TODO
18+ console . log ( argv ) ;
19+ }
20+
21+ module . exports = cmd ;
Original file line number Diff line number Diff line change 1+ var cmd = {
2+ command : 'show <problem>' ,
3+ desc : 'Show problem details' ,
4+ builder : {
5+ problem : {
6+ describe : 'Problem name or number.'
7+ }
8+ }
9+ } ;
10+
11+ cmd . handler = function ( argv ) {
12+ // TODO
13+ console . log ( argv ) ;
14+ }
15+
16+ module . exports = cmd ;
Original file line number Diff line number Diff line change 1+ var cmd = {
2+ command : 'update [--cached|-c] [--all|-a]' ,
3+ desc : 'Update problems list from leetcode' ,
4+ builder : {
5+ all : {
6+ alias : 'a' ,
7+ describe : 'Update all problems. (slow!)'
8+ } ,
9+ cached : {
10+ alias : 'c' ,
11+ describe : 'Also update those cached problems.'
12+ }
13+ }
14+ } ;
15+
16+ cmd . handler = function ( argv ) {
17+ // TODO
18+ console . log ( argv ) ;
19+ }
20+
21+ module . exports = cmd ;
Original file line number Diff line number Diff line change 44 "description" : " A cli tool to enjoy leetcode!" ,
55 "preferGlobal" : " true" ,
66 "bin" : {
7- "lc" : " ./bin/lc"
7+ "lc" : " ./bin/lc"
88 },
99 "scripts" : {
1010 "test" : " echo \" Error: no test specified\" && exit 1"
2727 "bugs" : {
2828 "url" : " https://github.com/skygragon/leetcode-cli/issues"
2929 },
30- "homepage" : " https://github.com/skygragon/leetcode-cli#readme"
30+ "homepage" : " https://github.com/skygragon/leetcode-cli#readme" ,
31+ "dependencies" : {
32+ "yargs" : " ^5.0.0"
33+ }
3134}
You can’t perform that action at this time.
0 commit comments