Git Product home page Git Product logo

cli-todo's Introduction

cli-todo

https://i.giphy.com/media/26ufnwz3wDUli7GU0/giphy.webp

Create a commandline todo list app that you can use from your terminal and that will keep track of things you need to do.

Deliverables:

Add to the list

node todo.js add "eat bak kut teh"
1. [ ] - eat bak kut teh

See the list

node todo.js show
1. [ ] - eat bak kut teh
2. [ ] - go shopping
3. [ ] - feed dog
4. [ ] - swim practice
5. [ ] - code app
6. [ ] - meet gabriel

Getting Started:

Create and install some things:

npm init
npm install jsonfile
touch data.json

Put the following code inside data.json:

{}

Now you can start coding the index.js file. The one provided has a basic jsonfile example in it. (you should get rid of this basic example as you code your app)

Implement the deliverables in the order shown above.

  1. Add to the list. (It starts empty)

  2. Show all the items in the list (Once you have something inside it)

Hint: you MUST add a data structure into the json file: the array of todo items you want to track.

So it should look like this:

data.json:

{
  "todoItems" : []
}

Hint: Which jsonfile library functions will you use for each of the above deliverables?

Hint: What will the JSON look like inside the data.json file when your app is done running an add?

Further:

Mark as done

node todo.js done 4
1. [ ] - go shopping
2. [ ] - feed dog
3. [ ] - swim practice
4. [x] - code app
5. [ ] - meet gabriel
6. [ ] - eat bak kut teh

Further:

Add a column named created_at with data type date and display the date the item was added. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

Further:

Add the ability to permanently delete an item.

Further:

Add a column named updated_at with data type date and display the date the item was marked completed.

Further:

Use an ascii art generator to add style to your app: http://patorjk.com/software/taag - here you could use the ES6 string interpolation syntax.

Further:

There are frameworks to make a completely dynamic command line app. Use a framework to make the app interactive: https://medium.freecodecamp.org/writing-command-line-applications-in-nodejs-2cf8327eee2

cli-todo's People

Contributors

awongh avatar laustinspayce avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.