UNPKG

ae-biu

Version:

Born For AE, Born To Do

24 lines (20 loc) 461 B
// @flow import clearLine from './clear-line' import chalk from 'chalk' export default class Loading { timer: any start = () => { let i = 0 this.timer = setInterval(() => { clearLine() const strs = ['|', '/', '-', '\\'] process.stdout.write(chalk.bgBlue('\n AE-BIU:INFO ') + chalk.yellow(' Compiling ' + strs[i % 4])) i++ }, 300) } clear = () => { if (this.timer) { clearInterval(this.timer) } } }