Skip to content

Commit

Permalink
chore: upgrade useful deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Sep 6, 2023
1 parent 58b619d commit 28483b8
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 48 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"nuxt": "3.6.5",
"sass": "^1.66.1",
"typescript": "5.1.6",
"unocss-preset-scrollbar": "^0.2.1",
"unocss-preset-useful": "latest"
"unocss-preset-useful": "^0.1.2"
},
"pnpm": {
"overrides": {
Expand Down
74 changes: 47 additions & 27 deletions pnpm-lock.yaml

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

48 changes: 29 additions & 19 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import {
type CSSObject,
type RuleContext,
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
transformerCompileClass,
transformerDirectives,
Expand Down Expand Up @@ -52,9 +49,19 @@ export default defineConfig({
}
}
}],
[/^(.+)::(.+)$/, ([, n, v], { theme }) => {
const color = parseColor(v, theme)
if (color?.cssColor?.type === 'rgb' && color.cssColor.components) {
return {
[`--${n}`]: `${color.cssColor.components.join(',')}`,
}
}
return {
[`--${n}`]: v,
}
}],
],
shortcuts: [
['trans', 'transition-all-350 ease-linear'],
['text', 'text-primary-text'],
['bg', 'bg-primary-bg'],
// ['u-prose', 'prose prose-reading'],
Expand Down Expand Up @@ -104,23 +111,26 @@ export default defineConfig({
},
presets: [
presetUno(),
presetAttributify(),
presetIcons({
extraProperties: {
'display': 'inline-block',
'height': '1.2em',
'width': '1.2em',
'vertical-align': 'text-bottom',
presetUseful({
theme: {
animation: {
animate: [
'shape 5s linear infinite',
],
},
},
collections: {
'my-logos': FileSystemIconLoader('./public/logos'),
icons: {
extraProperties: {
'display': 'inline-block',
'height': '1.2em',
'width': '1.2em',
'vertical-align': 'text-bottom',
},
collections: {
'my-logos': FileSystemIconLoader('./public/logos'),
},
},
}),
presetTypography({ cssExtend: typographyCssExtend }),
presetUseful({
themeAnimate: [
'shape 5s linear infinite',
],
typography: { cssExtend: typographyCssExtend },
}),
],
transformers: [
Expand Down

0 comments on commit 28483b8

Please sign in to comment.