-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from suubh/suubh-contribution
Styled the CLI interface using commander JS
- Loading branch information
Showing
3 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,24 +7,34 @@ const check={ | |
try{ | ||
key_manager=new keyManager(); | ||
const key=key_manager.getKey(); | ||
const s="Devloped by:Manikant Kumar"; | ||
const l="Github:https://github.com/devil-cyber"; | ||
const s="Devloped by:Manikant Kumar | "; | ||
const l="Github:https://github.com/devil-cyber | "; | ||
const email="Email:[email protected]"; | ||
const heading = "Crypto-Coin"; | ||
//const heading = "Crypto-Coin"; | ||
const title = "Welcome to the project!" | ||
|
||
const api=new crypto_api(key); | ||
const priceOutputData=await api.getPriceData(cmd.coin,cmd.cur); | ||
console.log("\n\n\n\n\n\n\n"); | ||
console.log("\t\t\t\t\t\t\t\t\t\t\t",heading.white) | ||
const chalk = require('chalk'); | ||
const clear = require('clear'); | ||
const figlet = require('figlet'); | ||
const files = require('../lib/files'); | ||
clear(); | ||
console.log( | ||
chalk.yellow( | ||
figlet.textSync('Crypto-Coin',{horizontalLayout: 'full'}) | ||
) | ||
); | ||
//console.log("\t\t\t\t\t\t\t\t\t\t\t",heading.white) | ||
console.log("\t\t\t\t\t\t\t\t\t\t",title.white) | ||
console.log("\n"); | ||
console.log("\t\t\t\t\t",s.green,l.yellow,email.red) | ||
console.log("\n"); | ||
console.log(priceOutputData); | ||
console.log("\n\n\n\n\n\n\n\n\n\n"); | ||
}catch(err){ | ||
consol.error(err.message.red); | ||
console.error(err.message.red); | ||
} | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
getCurrentDirectoryBase: () => { | ||
return path.basename(process.cwd()); | ||
}, | ||
|
||
directoryExists: (filePath) => { | ||
return fs.existsSync(filePath); | ||
} | ||
}; | ||
|