command-output
v0.2.4
Published
用于命令行信息输出与控制
Downloads
4
Readme
命令行助手
用于命令行信息输出与控制
import { CommandOutput } from 'command-output';
const ui = new CommandOutput()
const p1 = ui.progress('进度条1', 10);
let p2 = ui.progress('进度条2', 10, 1);
const f3 = ui.footerTextHold('文本状态保持: {var}', { var: new Date() }, 2);
let a = 1;
let b = 1;
const int = setInterval(() => {
ui.log('outline ' + (a + b * 10));
f3({ var: new Date() });
p2();
if (a === 10) {
a = 1;
b++;
p1();
p2 = ui.progress('进度条2', 10, 1);
}
a++;
if (b === 10) {
clearInterval(int);
ui.end();
}
}, 100);