Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

dbroberts/oclif-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todocli

Simple node.js todocli

oclif Version Downloads/week License

Usage

$ npm install -g todocli
$ todocli COMMAND
running command...
$ todocli (-v|--version|version)
todocli/0.0.1 win32-x64 node-v10.15.0
$ todocli --help [COMMAND]
USAGE
  $ todocli COMMAND
...

Commands

todocli add

Adds a new todo

USAGE
  $ todocli add

OPTIONS
  -n, --task=task  task

DESCRIPTION
  ...
  Adds a new todo to the existing list

See code: src\commands\add.js

todocli help [COMMAND]

display help for todocli

USAGE
  $ todocli help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

todocli remove

Describe the command here

USAGE
  $ todocli remove

OPTIONS
  -n, --name=name  name to print

DESCRIPTION
  ...
  Extra documentation goes here

See code: src\commands\remove.js

todocli show

Shows existing tasks

USAGE
  $ todocli show

DESCRIPTION
  ...
  Shows all the tasks sorted by their ids

See code: src\commands\show.js

todocli update

Marks a task as done

USAGE
  $ todocli update

OPTIONS
  -n, --id=id  task id

DESCRIPTION
  ...
  Marks a task as done

See code: src\commands\update.js

Issues

Required parameters

Several of the commands, like add, update, and remove require a name or id parameter (or flag). There is support in oclif for defining required flags, but when defined as such via .flags, the resulting error message apears to be directed to stderr instead of stdout, and I was unable to get the mocha tests to verify stderr output. For this reason, required params are currently validated during the Command.run function. This is an area that could be improved.

Unit Tests

The mocha unit tests are not complete. They cover all code branches, but depend on todo database state. These need to be refined so they are more robust and can execute even when no tasks have been defined.

About

Simple todo list using node with oclif

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published