Skip to content

Commit

Permalink
fix: wrong Glee version displayed in welcome message (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmvilas authored Jul 19, 2021
1 parent 182a297 commit 3fd9f0e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/logger.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { readFileSync } from 'fs'
import path from 'path'
import path, { dirname } from 'path'
import { fileURLToPath } from 'url'
import util from 'util'
import chalk from 'chalk'
import emojis from 'emojis'
import wordWrap from 'word-wrap'

export { chalk }

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

const highlightWords = (words, text) => {
let result = text

Expand All @@ -28,8 +32,8 @@ export const logWelcome = ({
const bgPrimary = chalk.bgHex(primaryColor)
const fgPrimary = chalk.hex(primaryColor)
const fgWarning = chalk.yellow

const pkg = JSON.parse(readFileSync(path.resolve(dir, 'package.json')))
const pkg = JSON.parse(readFileSync(path.resolve(__dirname, '../../package.json')))

console.log(bgPrimary.black(` Glee ${pkg.version} \n`))
if (dev) {
Expand Down

0 comments on commit 3fd9f0e

Please sign in to comment.