Skip to content

Commit

Permalink
custom logger to fix unreadable terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
walsh9 committed Aug 8, 2024
1 parent 8d598a0 commit b512dd8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ export default defineNuxtConfig({
scss: {
// besure to mirror theses imports in the vitest.config.ts
additionalData: '@import "@nypublicradio/nypr-design-system-vue3/src/assets/themes/gothamist/breakpoints.scss"; @import "@nypublicradio/nypr-design-system-vue3/src/assets/themes/gothamist/_mixins.scss"; @import "@nypublicradio/nypr-design-system-vue3/src/assets/themes/gothamist/typography.scss"; @import "~/assets/scss/global.scss";',
logger: {
warn(message, options) {
const { stderr } = process
// ignore deprecation warnings from nypr-design-system-vue3
if (!options.stack.toString().includes('nypr-design-system-vue3')) {
stderr.write('\n')
if (options.deprecation)
stderr.write('Deprecation ')
stderr.write(`Warning: ${message}\n`)
if (options.span !== undefined)
stderr.write(`\n>>> "${options.span.text}"\n`)
if (options.stack !== undefined)
stderr.write(` ${options.stack.toString().trimEnd().replace(/\n/gm, '\n ')}\n`)
stderr.write('\n')
}
},
},
},
},
postcss: {
Expand Down

0 comments on commit b512dd8

Please sign in to comment.