Skip to content

Commit

Permalink
Use readline for log util
Browse files Browse the repository at this point in the history
Fixes #73
Fixes #74
  • Loading branch information
cookpete committed Nov 13, 2018
1 parent a88facb commit 671c6b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import readline from 'readline'
import fs from 'fs'
import { spawn } from 'child_process'

const MONTH_NAMES = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']

export function log (string, clearLine = true) {
if (clearLine) {
process.stdout.clearLine()
process.stdout.cursorTo(0)
readline.clearLine(process.stdout)
readline.cursorTo(process.stdout, 0)
}
process.stdout.write(`auto-changelog: ${string}`)
}
Expand Down

0 comments on commit 671c6b8

Please sign in to comment.