Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved README #6

Merged
merged 1 commit into from
Oct 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,63 @@
# dikkenk-quotes
# Dikkenek Quotes

A simple NodeJS based application to get random quotes from the film "Dikkenek".

## Tech stack
This application runs on NodeJS. You can get the latest build from the official website https://nodejs.org/en/.

## Installation
Follwing are the steps to install this application

1. Clone this repository from https://github.com/Popovkov57/Dikkenek-quotes. In the terminal/command prompt, `cd` to the desired directory and type
```
git clone git@github.com:Popovkov57/Dikkenek-quotes.git
```
2. `cd` into the `Dikkenek-quotes` which was cloned.
```
cd Dikkenek-quotes
```

3. Install necessary dependencies
```
npm install
```

## File Structure
The `Dikkenek-quotes` has an `src` directory which consists of three files

1. `dikkenek-quotes.json`: It contains `JSON` data of a list of quotes.
2. `index.js`: It defines methods to pick a random quote from `dikkenek-quotes.json`.
3. `index.test.js`: It contains unit tests for methods defined in `index.js`.

## Running the application
1. To run all the unit tests, we use `mocha`, a JS testing library. Type
```
./node_modules/mocha/bin/mocha src/index.test.js
```
to run all tests. The output should be
```
dikkenek-quotes
all
✓ it should be an array of string
✓ it should contain `C’est excessivement énervant !`
random
✓ should return a random item from dikkenk.all
✓ should return an array of random items if passed a number

4 passing (8ms)
```

2. To use this library in your own app, you simply include the `index.js` and `dikkenek-quotes.json` file in working directory and `require` it in your file. Then you can use the methods defined in `index.js`.


## Build Information
[![Travis build](https://img.shields.io/travis/popovkov57/dikkenk-quotes.svg)]()

[![Codecov coverage](https://img.shields.io/codecov/c/github/popovkov57/dikkenk-quotes.svg)]()

[![Version](https://img.shields.io/npm/v/dikkenek-quotes.svg)]()

[![Download](https://img.shields.io/npm/dm/dikkenek-quotes.svg)]()

## License
[![MIT Licence](https://img.shields.io/npm/l/dikkenek-quotes.svg)]()