File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import del from 'del';
33import fs from 'fs/promises' ;
44import mkdirp from 'mkdirp' ;
55import { join } from 'path' ;
6+ import readline from 'readline' ;
67
78import { StatisticType } from './constants' ;
89import { listFolder } from './lib/list-folder' ;
@@ -51,14 +52,14 @@ export const generate = async (argv: Record<string, string>) => {
5152 // print out all files
5253 for ( const file of paths ) {
5354 if ( ! file . isDir ) {
54- process . stdout . clearLine ( - 1 ) ;
55- process . stdout . cursorTo ( 0 ) ;
55+ readline . clearLine ( process . stdout , 0 ) ;
56+ readline . cursorTo ( process . stdout , 0 ) ;
5657 process . stdout . write ( `${ chalk . dim ( ` ${ file . path } ` ) } ` ) ;
5758 await new Promise ( resolve => setTimeout ( resolve , 20 ) ) ;
5859 }
5960 }
60- process . stdout . clearLine ( - 1 ) ;
61- process . stdout . cursorTo ( 0 ) ;
61+ readline . clearLine ( process . stdout , 0 ) ;
62+ readline . cursorTo ( process . stdout , 0 ) ;
6263
6364 // iterate through files and parse them
6465 for ( const file of paths ) {
You can’t perform that action at this time.
0 commit comments