diff --git a/package-lock.json b/package-lock.json index e5e4147..e931098 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@swup/cli", - "version": "0.3.3", + "version": "4.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8726df8..08dedd5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@swup/cli", "description": "Create swup plugins and themes in seconds, or validate your website.", - "version": "4.0.2", + "version": "4.0.3", "author": { "name": "Georgy Marchuk", "email": "gmarcuk@gmail.com", diff --git a/src/utils.js b/src/utils.js index 8daf564..d9c0a76 100644 --- a/src/utils.js +++ b/src/utils.js @@ -2,6 +2,7 @@ const normal = require('chalk/source').white const error = require('chalk/source').red const info = require('chalk/source').cyan const success = require('chalk/source').green +const readline = require('readline') export const syncForEach = async (array, callback) => { for (let index = 0; index < array.length; index++) { @@ -62,8 +63,8 @@ export class Log { } removeTemporaryLog(text) { - process.stdout.clearLine() - process.stdout.cursorTo(0) + readline.clearLine(process.stdout, 0) + readline.cursorTo(process.stdout, 0, null) this.log(text) } }