Skip to content

Commit

Permalink
fix: better coloured output
Browse files Browse the repository at this point in the history
  • Loading branch information
msanguineti committed Nov 18, 2019
1 parent 0b09b74 commit be6fba8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/cmds/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Init implements CommandModule {
try {
if (argv.defaultValues) {
writeConfigFile({ data: getDefaultConfigValues() })
console.log(info('Config file created: gof.config.js'))
console.log('Config file created:', info('gof.config.js'))
} else {
const jsonValues: ConfigValues = await prompt(generateQuestions(argv))

Expand Down
16 changes: 8 additions & 8 deletions src/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@

import chalk from 'chalk'

export const success = (str: string): string => {
export const bold = (str: unknown): string => {
return chalk.bold(str)
}

export const success = (str: unknown): string => {
return chalk.black.bgGreen(str)
}

export const warning = (str: string): string => {
export const warning = (str: unknown): string => {
return chalk.black.bgYellow(str)
}

export const error = (str: string): string => {
export const error = (str: unknown): string => {
return chalk.black.bgRed(str)
}

export const info = (str: string): string => {
export const info = (str: unknown): string => {
return chalk.black.bgCyan(str)
}

export const bold = (str: string): string => {
return chalk.bold(str)
}

0 comments on commit be6fba8

Please sign in to comment.