Skip to content

Commit a27c41b

Browse files
committed
refactor: update utils
1 parent 767a685 commit a27c41b

4 files changed

Lines changed: 7 additions & 17 deletions

File tree

src/utils/error.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { bold, cyan, red } from '@hypernym/colors'
1+
import process from 'node:process'
2+
import { cyan, red } from '@hypernym/colors'
23
import { name } from '../bin/meta.js'
34

45
export function error(err: any): never {
5-
console.log(bold(red(name)), 'Something went wrong...')
6+
console.log(red(name), 'Something went wrong...')
67
console.error(err)
78
return process.exit(1)
89
}

src/utils/get-output-path.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/utils/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from './logger.js'
22
export * from './error.js'
3-
export * from './get-output-path.js'

src/utils/logger.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { stdout } from 'node:process'
2-
import { bold, cyan, magenta, dim } from '@hypernym/colors'
1+
import process, { stdout } from 'node:process'
2+
import { cyan, magenta, dim } from '@hypernym/colors'
33
import { name, version } from '../bin/meta.js'
44

55
const cl = console.log
@@ -24,13 +24,13 @@ export const logger = {
2424
start: (): void => {
2525
cl()
2626
log(dim(name), dim(version))
27-
log(bold(cyan(name)), `Bundling started...`)
27+
log(cyan(name), `Bundling started...`)
2828
cl()
2929
},
3030
exit: (message: string): never => {
3131
cl()
3232
log(dim(name), dim(version))
33-
log(bold(magenta(name)), message)
33+
log(magenta(name), message)
3434
cl()
3535
return process.exit(1)
3636
},

0 commit comments

Comments
 (0)