-
Notifications
You must be signed in to change notification settings - Fork 11
/
tailwind.config.ts
48 lines (43 loc) · 1.66 KB
/
tailwind.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import {
pg_colors,
pg_fonts,
pg_backgrounds,
} from './themes/pg-tailwindcss/tokens.cjs'
import { getFontsWithFallback } from './app/utils/font'
import { safelist } from './app/utils/colors'
import tailwindTypography from '@tailwindcss/typography'
import tailwindForms from '@tailwindcss/forms'
import tailwindCssPluginPinegrow from '@pinegrow/tailwindcss-plugin'
export default {
darkMode: 'class',
plugins: [
tailwindTypography,
tailwindForms,
tailwindCssPluginPinegrow({
// colors: { ...pg_colors, pp: pg_colors.primary }, // pp, primary, secondary etc
fonts: getFontsWithFallback(pg_fonts),
backgrounds: pg_backgrounds, // bg-design-image, bg-design-image-large
}),
],
theme: {
extend: {
// Nuxt UI can process colors extended directly, and not via plugin (as above), so the colors are added here instead of passing it to @pinegrow/tailwindcss-plugin above
// Primary is added additionally as pp as it's required to set Nuxt UI's primary in app.config.ts. Other colors like secondary etc can be used in Nuxt UI component's color prop
colors: { ...pg_colors, pp: pg_colors.primary },
},
},
get content() {
const _content = [
'{.,app,*-layer}/components/**/*.{js,vue,ts}',
'{.,app,*-layer}/layouts/**/*.vue',
'{.,app,*-layer}/pages/**/*.vue',
'{.,app,*-layer}/plugins/**/*.{js,ts}',
'{.,app,*-layer}/app.vue',
'{.,app,*-layer}/*.{mjs,js,ts}',
'{.,*-layer}/nuxt.config.{js,ts}',
]
return process.env.NODE_ENV === 'production'
? _content
: [..._content, './_pginfo/**/*.{html,js}'] // used by Vue Desginer for live-designing during development
},
}