The current project consist in a program that process a file with people's names and generate an output file with statistics.
| Step | Action | Command |
|---|---|---|
| 1 | Download the project | ---- |
| 2 | Install dependencies | npm i |
| 3 | Ran the project for development | npm run dev |
| 4 | Build the project | npm run build |
That's all!.
The last command will run the project with the input.txt file, but you can also run the project with a custom input
file or request a custom number of names in the modified list generated:
There are several ways to ran the project depending of what you want to do:
| Method | Action | Command |
|---|---|---|
| 1 | Run the project with the default input file | npm run dev |
| 2 | Run the project with a custom input file | ts-node src/index.ts [custom_input_path] |
| 3 | Change the limit of names generated at the end of the program | ts-node src/index.ts input.txt [N-of-names] |
| 4 | Ran the project with a custom input file and a custom N | ts-node src/index.ts [custom_input_path] [N-of-names] |
Follow these steps to compile the program.
Once you have the program compiled, then you could run the output file using node or ts-node, please check this examples:
- I'm in the project root folder and will compile the program:
npm run build - A file is generated in the path
bin/index.js - I will to run that file:
node bin/index.js input.txt 40
