-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
28 lines (24 loc) · 830 Bytes
/
app.js
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
let colors = require('colors');
const {argv} = require('./config/yargs');
const {crearArchivo,mostrarInfo} = require('./multiplicar/multiplicar');
let process = argv._;
// console.log(process);return;
if (process == 'crear'){
console.log(`Creando tabla del ${argv.base} hasta el ${argv.hasta}`.blue.bgYellow);
crearArchivo(argv.base, argv.hasta)
.then(result => {
console.log(`Éxito! ${result}`.green)
})
.catch(error => {
console.log(error);
});
} else if (process == 'listar'){
console.log(`Mostrando tabla del ${argv.base} hasta el ${argv.hasta}`.black.bgWhite);
mostrarInfo(argv.base, argv.hasta)
.then(result => {
console.log(`${result}`.green)
})
.catch(error => {
console.log(error);
});
}