Skip to content

Commit 2e276b6

Browse files
authored
refactor: move colorette to consola/utils (#805)
1 parent 3b47f5d commit 2e276b6

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"autoprefixer": "^10.4.17",
4848
"chokidar": "^3.5.3",
4949
"clear-module": "^4.1.2",
50-
"colorette": "^2.0.20",
5150
"consola": "^3.2.3",
5251
"defu": "^6.1.4",
5352
"h3": "^1.10.0",

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/viewer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { underline, yellow } from 'colorette'
1+
import { colors } from 'consola/utils'
22
import { eventHandler, sendRedirect, H3Event } from 'h3'
33
import { addDevServerHandler, isNuxt2, isNuxt3, useNuxt } from '@nuxt/kit'
44
import { withTrailingSlash, withoutTrailingSlash, joinURL, cleanDoubleSlashes } from 'ufo'
@@ -43,7 +43,7 @@ export const setupViewer = async (twConfig: Partial<TWConfig>, config: ViewerCon
4343

4444
nuxt.hook('listen', (_, listener) => {
4545
const viewerUrl = cleanDoubleSlashes(joinURL(listener.url, config.endpoint))
46-
logger.info(`Tailwind Viewer: ${underline(yellow(withTrailingSlash(viewerUrl)))}`)
46+
logger.info(`Tailwind Viewer: ${colors.underline(colors.yellow(withTrailingSlash(viewerUrl)))}`)
4747
})
4848
}
4949

@@ -57,6 +57,6 @@ export const exportViewer = async (pathToConfig: string, config: ViewerConfig, n
5757

5858
const dir = joinURL(nitro.options.output.publicDir, config.endpoint)
5959
cli(dir, pathToConfig)
60-
logger.success(`Exported viewer to ${yellow(relative(nuxt.options.srcDir, dir))}`)
60+
logger.success(`Exported viewer to ${colors.yellow(relative(nuxt.options.srcDir, dir))}`)
6161
})
6262
}

0 commit comments

Comments
 (0)