Guest User

Untitled

a guest
Jun 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import {Command} from '@oclif/command'
  2.  
  3. export default class Add extends Command {
  4. static description = 'Add new todo to list'
  5.  
  6. static args = [{name: 'todo'}]
  7.  
  8. async run() {
  9. const {args} = this.parse(Add)
  10. const todo = args.todo
  11. if (todo) {
  12. this.log(`[Success] Added new todo: ${todo}`)
  13. } else {
  14. this.error('please specify the new todo')
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment