Skip to content

Commit

Permalink
fix: clean up the cli output (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgandecki authored Jan 31, 2021
1 parent 01566c6 commit b847a81
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions src/generate/helpers/ListrHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DefaultRenderer } from 'listr2/dist/renderer/default.renderer';
import logUpdate from 'log-update';
import debugConfigurator from 'debug';
import { ListrContext, ListrRendererFactory, ListrTaskWrapper } from 'listr2';
const debug = debugConfigurator('Listr');
Expand All @@ -18,30 +17,5 @@ export const newTask = (

// @ts-ignore
export class ListrRenderer extends DefaultRenderer {
spinner = ['πŸ™ˆ ', 'πŸ™‰ ', 'πŸ™Š '];

public render(): void {
// Do not render if we are already rendering
// @ts-ignore
if (this.id) {
return;
}

const updateRender = (): void => logUpdate(this.createRender());

/* istanbul ignore if */
if (!this.options?.lazy) {
// @ts-ignore
this.id = setInterval(() => {
// @ts-ignore
this.spinnerPosition = ++this.spinnerPosition % this.spinner.length;
updateRender();
}, 300);
}

// @ts-ignore
this.renderHook$.subscribe(() => {
updateRender();
});
}
spinner = ['πŸ™ˆ ', 'πŸ™ˆ ', 'πŸ™‰ ', 'πŸ™‰ ', 'πŸ™Š ', 'πŸ™Š '];
}

0 comments on commit b847a81

Please sign in to comment.