ss25-atm-machine-typescript
v1.1.0
Published
1. Create a repository. 2. Clone the repository in the folder that you want to make your project in. 3. Make tsconfig file in the project by "tsc –init" command in terminal. 4. For package.json file type "npm init" command. 5. Run "npm install inquire
Downloads
3
Readme
ATM-machine-TYPESCRIPT
- 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.