-
Notifications
You must be signed in to change notification settings - Fork 20
/
helper.ts
33 lines (30 loc) · 1.43 KB
/
helper.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { green, bold } = require('kleur');
/**
* Shown when user runs `tcg` without arguments
*/
export function showHelpMessage(): void {
console.log(green('╭───────────────────────────╮'));
console.log(green('│ │'));
console.log(green('│ ') + bold('Typescript Call Graph') + green(' │'));
console.log(green('│ │'));
console.log(green('╰───────────────────────────╯'));
console.log('Please provide a list of input files and/or folders');
console.log('e.g. `'
+ green('myFile.ts') + '`, `'
+ green('*') + '`, `'
+ green('**/*') + '`, `'
+ green('myFolder/*') + '`');
console.log('or any combination of the above, like `' + green('myFile.ts myFolder/*') + '`');
}
/**
* Console log that server is running
* @param filePath
*/
export function showServerRunning(filePath): void {
// Helpful message
console.log(green('╭───────────────────────────╮'));
console.log(green('│ ') + 'Graph visible @ ' + green(' │'));
console.log(green('│ ') + filePath + green(' │'));
console.log(green('│ ') + 'Ctrl + C to quit ' + green(' │'));
console.log(green('╰───────────────────────────╯'));
}