Skip to content

Commit

Permalink
chore: reducing dependencies (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
ineshbose committed Mar 17, 2023
1 parent bea366a commit 3f695f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
"@nuxt/kit": "^3.3.1",
"@nuxt/postcss8": "^1.1.3",
"autoprefixer": "^10.4.14",
"chalk": "^5.2.0",
"chokidar": "^3.5.3",
"clear-module": "^4.1.2",
"consola": "^2.15.3",
"defu": "^6.1.2",
"pathe": "^1.1.0",
"postcss": "^8.4.21",
Expand Down
5 changes: 1 addition & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { existsSync } from 'fs'
import { join, relative, dirname } from 'pathe'
import { defuArrayFn } from 'defu'
import { watch } from 'chokidar'
import chalk from 'chalk'
import consola from 'consola'
import { underline, yellow } from 'colorette'
import {
defineNuxtModule,
installModule,
addTemplate,
addDevServerHandler,
isNuxt2,
useLogger,
getNuxtVersion,
createResolver,
resolvePath,
Expand All @@ -23,7 +23,7 @@ import vitePlugin from './hmr'
import defaultTailwindConfig from './tailwind.config'
import { InjectPosition, resolveInjectPosition } from './utils'

const logger = consola.withScope('nuxt:tailwindcss')
const logger = useLogger('nuxt:tailwindcss')

const layerPaths = (srcDir: string) => ([
`${srcDir}/components/**/*.{vue,js,ts}`,
Expand Down Expand Up @@ -344,7 +344,7 @@ export default defineNuxtModule<ModuleOptions>({
if (isNuxt2()) { nuxt.options.serverMiddleware.push({ route, handler: viewerDevMiddleware }) }
nuxt.hook('listen', (_, listener) => {
const viewerUrl = `${withoutTrailingSlash(listener.url)}${route}`
logger.info(`Tailwind Viewer: ${chalk.underline.yellow(withTrailingSlash(viewerUrl))}`)
logger.info(`Tailwind Viewer: ${underline(yellow(withTrailingSlash(viewerUrl)))}`)
})
}

Expand Down

0 comments on commit 3f695f8

Please sign in to comment.