this is the Source code of Node js and Typescript Based Calculator Runs on the Command line Interface , its package Also published at NPM Marketplace. to run calculator do :
-
npm i project-04-cli-based-calculator-node-and-typescript
-
npx ahmedcacli
-
initialized typescript enviroment through npx tsc -init
-
intialized node js enviroment npm init -yes
-
npm i chalk
-
npm i chalk-animation
-
npm i inquirer
-
npm i nanospinner
-
npm install typescript --save-dev
-
npm i -g typescript
-
npx tsc --init
-
npm i ts-node-dev
-
npm install nodemon --save-dev
-
npm install @types/node --save-dev
15)Add .js file with this at top : #! /usr/bin/env node
16)setup Json file(example) :
"bin": { "multiply": "bin/index.js" },
17)Test package locally(for example :
npx multiply
18)Add Dependencies and import it to your main file :
npm i prompt-sync
19)create or login your npm account
npm login
20)publish your package
-
npm publish
-
added calculator basic opetaions features - , + , * , /