Skip to content

Commit

Permalink
test: adapt v0.65.0 new generator usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Jiang committed Dec 3, 2024
1 parent fd6e685 commit 3bf611b
Show file tree
Hide file tree
Showing 19 changed files with 3,377 additions and 2,876 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ dist-ssr
# VitePress
docs/.vitepress/dist
docs/.vitepress/cache

# tsc
/*.tsbuildinfo
18 changes: 18 additions & 0 deletions .ncurc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
const MINOR_PACKAGES = new Set([
'@types/node',
'eslint',
])


const PATCH_PACKAGES = new Set([])


module.exports = {
format: 'group',
interactive: true,
target: (packageName) => {
if (MINOR_PACKAGES.has(packageName))
return 'minor'

if (PATCH_PACKAGES.has(packageName))
return 'patch'

return 'latest'
},
}
7 changes: 4 additions & 3 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export default defineBuildConfig({
clean: true,
declaration: true,
externals: [
'@unocss/core',
'@unocss/preset-mini',
'@unocss/preset-mini/utils',
/@unocss\/.+/,
],
alias: {
'@': fileURLToPath(new URL('src', import.meta.url)),
Expand All @@ -22,6 +20,9 @@ export default defineBuildConfig({
respectExternal: false,
},
inlineDependencies: true,
output: {
exports: 'named',
},
},
failOnWarn: false,
})
4 changes: 4 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unocss from 'unocss/vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitepress'
import { version } from '../../package.json'
import externalLinkIcon from './plugins/externalLinkIcon'
Expand All @@ -9,7 +10,10 @@ export default defineConfig({

vite: {
plugins: [
// @ts-expect-error - Vite 6 type issue
unocss(),
// @ts-expect-error - Vite 6 type issue
tsconfigPaths(),
],
},

Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { isDark } = useData()
function enableTransitions(): boolean {
return 'startViewTransition' in document
&& window.matchMedia('(prefers-reduced-motion: no-preference)').matches
&& globalThis.matchMedia('(prefers-reduced-motion: no-preference)').matches
}
provide('toggle-appearance', async () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'virtual:uno.css'

import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { h } from 'vue'
import Layout from './Layout.vue'
import type { Theme } from 'vitepress'

import './style.scss'

Expand Down
2 changes: 1 addition & 1 deletion docs/uno.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Theme } from '@unocss/preset-mini'
import {
defineConfig,
presetIcons,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import type { Theme } from '@unocss/preset-mini'


export default defineConfig<Theme>({
Expand Down
14 changes: 13 additions & 1 deletion eslintConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@ import { defineConfig } from '@aelita-dev/eslint-config'

export default defineConfig(
{
stylistic: {
semi: false,
commaDangle: 'always-multiline',
indent: 2,
quotes: 'single',
},
'import': {
ruleOptions: {
order: {
typeImportsFirst: true,
},
},
},
typescript: {
tsconfigPath: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.node.js.json'],
projectType: 'lib',
},
vue: {
Expand Down
62 changes: 33 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "unocss-preset-animations",
"version": "1.1.0",
"description": "💅 An animation preset for UnoCSS, which adapts the tailwindcss-animate plugin",
"packageManager": "pnpm@9.5.0",
"packageManager": "pnpm@9.14.4",
"type": "module",
"author": "Aelita <https://github.com/xsjcTony>",
"license": "MIT",
Expand Down Expand Up @@ -38,8 +38,9 @@
"scripts": {
"build": "unbuild",
"release": "pnpm test:ci && bumpp",
"typecheck": "vue-tsc --noEmit",
"typecheck": "vue-tsc",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"test:update": "vitest run -u",
Expand All @@ -55,38 +56,41 @@
"*": "pnpm lint"
},
"devDependencies": {
"@aelita-dev/eslint-config": "2.3.5",
"@iconify/json": "^2.2.227",
"@types/dom-view-transitions": "^1.0.4",
"@types/markdown-it": "^14.1.1",
"@types/node": "^20.14.10",
"@unocss/core": "^0.61.3",
"@unocss/eslint-plugin": "^0.61.3",
"@unocss/preset-mini": "^0.61.3",
"@vitest/coverage-v8": "^2.0.2",
"@vue/language-server": "^2.0.26",
"bumpp": "^9.4.1",
"@aelita-dev/eslint-config": "3.10.0",
"@iconify/json": "^2.2.278",
"@types/dom-view-transitions": "^1.0.5",
"@types/markdown-it": "^14.1.2",
"@types/node": "^20.17.9",
"@unocss/core": "^0.65.0",
"@unocss/eslint-plugin": "^0.65.0",
"@unocss/preset-mini": "^0.65.0",
"@vitest/coverage-v8": "^2.1.8",
"@vitest/eslint-plugin": "^1.1.14",
"@vue/language-server": "2.1.10",
"bumpp": "^9.8.1",
"bundle-require": "^5.0.0",
"changelogithub": "^0.13.7",
"eslint": "^8.57.0",
"eslint-plugin-vitest": "^0.5.4",
"eslint-plugin-vue": "^9.27.0",
"eslint-plugin-vuejs-accessibility": "^2.3.1",
"changelogithub": "^0.13.11",
"eslint": "^9.16.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.4.3",
"eslint-plugin-vue": "^9.32.0",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"eslint-processor-vue-blocks": "^0.1.2",
"lint-staged": "^15.2.7",
"lint-staged": "^15.2.10",
"markdown-it": "^14.1.0",
"sass": "^1.77.8",
"sass": "^1.81.1",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.5.3",
"unbuild": "^2.0.0",
"unocss": "^0.61.3",
"vitepress": "1.3.1",
"vitest": "^2.0.2",
"vue": "^3.4.31",
"vue-tsc": "^2.0.26"
"typescript": "~5.6.3",
"unbuild": "3.0.0-rc.1",
"unocss": "^0.65.0",
"vite-tsconfig-paths": "^5.1.3",
"vitepress": "1.5.0",
"vitest": "^2.1.8",
"vue": "^3.5.13",
"vue-tsc": "2.1.10"
},
"peerDependencies": {
"@unocss/preset-wind": ">= 0.56.0 < 1",
"unocss": ">= 0.56.0 < 1"
"@unocss/preset-wind": ">=0.56.0 < 1",
"unocss": ">=0.56.0 < 1"
}
}
Loading

0 comments on commit 3bf611b

Please sign in to comment.