Skip to content

Commit

Permalink
add bin/brain-games.js package-lock.json package.json src/
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Sep 28, 2023
1 parent bfece18 commit 4b03312
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
6 changes: 2 additions & 4 deletions bin/brain-games.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env node

console.log('Welcome to the Brain Games!');

import readlineSync from 'readline-sync';
import { name } from 'src/cli.js'

const name = readlineSync.question('May I have your name? John');
name();
16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
"version": "1.0.0",
"description": "[![Actions Status](https://github.com/Tanya14081981/frontend-project-44/workflows/hexlet-check/badge.svg)](https://github.com/Tanya14081981/frontend-project-44/actions)",
"bin": {
"brain-games": "bin/brain-games.js"
"brain-games": "bin/brain-games.js"
},
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
"license": "ISC",
"dependencies": {
"readline-sync": "^1.4.10"
}
}
4 changes: 4 additions & 0 deletions src/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
console.log('Welcome to the Brain Games!');

export const name = readlineSync.question('May I have your name?');
console.log('Hello ' + name + '!');

0 comments on commit 4b03312

Please sign in to comment.