-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aeb17c7
commit 19e07a4
Showing
3 changed files
with
89 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,59 @@ | ||
import { defineConfig, mergeConfigs, presetIcons, presetWebFonts } from 'unocss' | ||
import { createExternalPackageIconLoader } from '@iconify/utils/lib/loader/external-pkg' | ||
import { | ||
defineConfig, | ||
presetAttributify, | ||
presetIcons, | ||
presetTypography, | ||
presetWebFonts, | ||
presetWind3, | ||
transformerDirectives, | ||
transformerVariantGroup, | ||
} from 'unocss' | ||
|
||
import UnoCSSConfig from '../../uno.config' | ||
|
||
export default defineConfig(mergeConfigs([ | ||
UnoCSSConfig, | ||
{ | ||
presets: [ | ||
presetWebFonts({ | ||
fonts: { | ||
sans: 'DM Sans', | ||
serif: 'DM Serif Display', | ||
mono: 'DM Mono', | ||
cute: 'Kiwi Maru', | ||
cuteen: 'Sniglet', | ||
}, | ||
}), | ||
presetIcons({ | ||
scale: 1.2, | ||
}), | ||
], | ||
// hyoban/unocss-preset-shadcn: Use shadcn ui with UnoCSS | ||
// https://github.com/hyoban/unocss-preset-shadcn | ||
// | ||
// Thanks to | ||
// https://github.com/unovue/shadcn-vue/issues/34#issuecomment-2467318118 | ||
// https://github.com/hyoban-template/shadcn-vue-unocss-starter | ||
// | ||
// By default, `.ts` and `.js` files are NOT extracted. | ||
// If you want to extract them, use the following configuration. | ||
// It's necessary to add the following configuration if you use shadcn-vue or shadcn-svelte. | ||
content: { | ||
pipeline: { | ||
include: [ | ||
// the default | ||
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/, | ||
// include js/ts files | ||
'(components|src)/**/*.{js,ts}', | ||
], | ||
export default defineConfig({ | ||
presets: [ | ||
presetWind3(), | ||
presetAttributify(), | ||
presetTypography(), | ||
presetWebFonts({ | ||
fonts: { | ||
sans: 'DM Sans', | ||
serif: 'DM Serif Display', | ||
mono: 'DM Mono', | ||
cute: 'Kiwi Maru', | ||
cuteen: 'Sniglet', | ||
}, | ||
}), | ||
presetIcons({ | ||
scale: 1.2, | ||
collections: { | ||
...createExternalPackageIconLoader('@proj-airi/lobe-icons'), | ||
}, | ||
}), | ||
], | ||
transformers: [ | ||
transformerDirectives(), | ||
transformerVariantGroup(), | ||
], | ||
safelist: 'prose prose-sm m-auto text-left'.split(' '), | ||
// hyoban/unocss-preset-shadcn: Use shadcn ui with UnoCSS | ||
// https://github.com/hyoban/unocss-preset-shadcn | ||
// | ||
// Thanks to | ||
// https://github.com/unovue/shadcn-vue/issues/34#issuecomment-2467318118 | ||
// https://github.com/hyoban-template/shadcn-vue-unocss-starter | ||
// | ||
// By default, `.ts` and `.js` files are NOT extracted. | ||
// If you want to extract them, use the following configuration. | ||
// It's necessary to add the following configuration if you use shadcn-vue or shadcn-svelte. | ||
content: { | ||
pipeline: { | ||
include: [ | ||
// the default | ||
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/, | ||
// include js/ts files | ||
'(components|src)/**/*.{js,ts}', | ||
], | ||
}, | ||
}, | ||
])) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.