ss25-number-guessing-game
v1.0.1
Published
This is a number guessing game
Downloads
2
Readme
“Number Guessing Game”
- Create a repository.
- Clone the repository in the folder that you want to make your project in.
- Make tsconfig file in the project by "tsc –init" command in terminal.
- For package.json file type "npm init" command.
- Run "npm install inquirer".
- Create index.ts file and write import inquirer from “inquirer” .
- To declare inquirer types run "npm i --save-dev @types/inquirer".
- In your package.json file after “main”:”index.js” add-> “type”:”module”.
- In tsconfig.json update “target”:”ESNext” and “module”:”NodeNext” and uncomment “moduleResolution”:”NodeNext”.
- Write code in index.ts after import inquirer from “inquirer”.
- Transpile it by running "tsc" command in your terminal.
- Run yout project by "node index" or "node index.js" command.
- Now make it an npm tool
- In your index.ts file in the first line type "#! /usr/bin/env node".
- Run npm login in your terminal.
- Run npm publish
- To access your project from any device type "npx name-of-package" or "npm i name-of-package"in your command prompt.