feat: 添加 Vue 类型检查到 CI 流程,更新 Icons.vue 和 unocss.config.ts 文件
Some checks failed
CI / build-and-deploy (push) Failing after 50s
Some checks failed
CI / build-and-deploy (push) Failing after 50s
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -34,6 +34,8 @@ jobs:
|
|||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- name: 静态代码分析
|
- name: 静态代码分析
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
|
- name: Vue 类型检查
|
||||||
|
run: npx vue-tsc --build --force
|
||||||
|
|
||||||
# - name: Build
|
# - name: Build
|
||||||
# run: pnpm build
|
# run: pnpm build
|
||||||
|
@ -4,20 +4,20 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div b="1px solid pink" mt-8 text-16 p-8 space-y-8>
|
<div b="1px solid pink" mt-8 text-16 p-8 space-y-8>
|
||||||
<div b="1px solid pink">
|
<!-- <div b="1px solid pink">
|
||||||
<div>@iconify-json/carbon/icons.json</div>
|
<div>@iconify-json/carbon/icons.json</div>
|
||||||
<div i-carbon-face-cool text-orange />
|
<div i-carbon-face-cool text-orange />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div b="1px solid pink">
|
<div b="1px solid pink">
|
||||||
<div>Icons({ autoInstall: true })</div>
|
<div>Icons({ autoInstall: true })</div>
|
||||||
<icon-carbon-face-cool class="text-yellow" w-32 h-32 />
|
<icon-carbon-face-cool class="text-yellow" w-32 h-32 />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div b="1px solid pink">
|
<!-- <div b="1px solid pink">
|
||||||
<div>pacman.svg</div>
|
<div>pacman.svg</div>
|
||||||
<div class="i-icon:pacman text-(pink)" />
|
<div class="icon:pacman text-(pink)" />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div b="1px solid pink">
|
<div b="1px solid pink">
|
||||||
<div>pacman.svg</div>
|
<div>pacman.svg</div>
|
||||||
|
@ -1,14 +1,6 @@
|
|||||||
// https://github.dev/unocss/unocss/tree/main/examples/vite-vue3
|
// https://github.dev/unocss/unocss/tree/main/examples/vite-vue3
|
||||||
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders';
|
|
||||||
import presetRemToPx from '@unocss/preset-rem-to-px';
|
import presetRemToPx from '@unocss/preset-rem-to-px';
|
||||||
import {
|
import { defineConfig, presetAttributify, presetUno, transformerDirectives, transformerVariantGroup } from 'unocss';
|
||||||
defineConfig,
|
|
||||||
presetAttributify,
|
|
||||||
presetIcons,
|
|
||||||
presetUno,
|
|
||||||
transformerDirectives,
|
|
||||||
transformerVariantGroup,
|
|
||||||
} from 'unocss';
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
@ -28,26 +20,26 @@ export default defineConfig({
|
|||||||
// https://unocss.dev/presets/attributify
|
// https://unocss.dev/presets/attributify
|
||||||
presetAttributify(),
|
presetAttributify(),
|
||||||
|
|
||||||
presetIcons({
|
// presetIcons({
|
||||||
/*extraProperties: {
|
// /*extraProperties: {
|
||||||
display: "inline-block",
|
// display: "inline-block",
|
||||||
"vertical-align": "middle",
|
// "vertical-align": "middle",
|
||||||
},*/
|
// },*/
|
||||||
cdn: 'https://esm.sh/',
|
// cdn: 'https://esm.sh/',
|
||||||
customizations: {
|
// customizations: {
|
||||||
iconCustomizer(collection, icon, props) {
|
// iconCustomizer(collection, icon, props) {
|
||||||
props.width = '1em';
|
// props.width = '1em';
|
||||||
props.height = '1em';
|
// props.height = '1em';
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
collections: {
|
// collections: {
|
||||||
icon: FileSystemIconLoader('src/assets/icons/svgs', (svg) => {
|
// icon: FileSystemIconLoader('src/assets/icons/svgs', (svg) => {
|
||||||
return svg.replace(/#000000|#000/g, 'currentColor');
|
// return svg.replace(/#000000|#000/g, 'currentColor');
|
||||||
}),
|
// }),
|
||||||
carbon: () => import('@iconify-json/carbon/icons.json').then((i) => i.default),
|
// carbon: () => import('@iconify-json/carbon/icons.json').then((i) => i.default),
|
||||||
},
|
// },
|
||||||
warn: true,
|
// warn: true,
|
||||||
}), // https://unocss.dev/presets/icons
|
// }), // https://unocss.dev/presets/icons
|
||||||
],
|
],
|
||||||
transformers: [
|
transformers: [
|
||||||
//https://unocss.dev/transformers/variant-group
|
//https://unocss.dev/transformers/variant-group
|
||||||
|
Reference in New Issue
Block a user