Skip to content

Commit

Permalink
chore: switch to vite 5 (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Nov 20, 2023
1 parent 087fa94 commit 88f3665
Show file tree
Hide file tree
Showing 9 changed files with 444 additions and 315 deletions.
6 changes: 5 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type DefaultTheme, defineConfig } from 'vitepress'
import { defineConfig, type DefaultTheme } from 'vitepress'

export default defineConfig({
lang: 'en-US',
Expand All @@ -23,6 +23,10 @@ export default defineConfig({
pattern: 'https://github.com/globalbrain/sefirot/edit/main/docs/:path'
},

search: {
provider: 'local'
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/globalbrain/sefirot' }
],
Expand Down
9 changes: 8 additions & 1 deletion lib/composables/Image.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isClient } from '@vueuse/core'
import { type MaybeRefOrGetter, type Ref, ref, toValue, watchEffect } from 'vue'
import { isFile, isString } from '../support/Utils'

Expand All @@ -13,7 +14,13 @@ export interface ImageSrcFromFile {
export function useImageSrcFromFile(
file: MaybeRefOrGetter<File | string | null>
): ImageSrcFromFile {
const reader = new FileReader()
if (!isClient) {
return {
src: ref(null)
}
}

const reader = new window.FileReader()
const src = ref<string | null>(null)

reader.onload = function () {
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@globalbrain/sefirot",
"version": "3.5.0",
"packageManager": "[email protected].4",
"packageManager": "[email protected].5",
"description": "Vue Components for Global Brain Design System.",
"author": "Kia Ishii <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -72,15 +72,15 @@
"@types/body-scroll-lock": "^3.1.2",
"@types/lodash-es": "^4.17.11",
"@types/markdown-it": "^13.0.6",
"@types/node": "^20.9.0",
"@vitejs/plugin-vue": "^4.4.1",
"@vitest/coverage-v8": "^1.0.0-beta.4",
"@vue/test-utils": "^2.4.1",
"@types/node": "^20.9.2",
"@vitejs/plugin-vue": "^4.5.0",
"@vitest/coverage-v8": "^1.0.0-beta.5",
"@vue/test-utils": "^2.4.2",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"@vueuse/core": "^10.6.1",
"body-scroll-lock": "4.0.0-beta.0",
"eslint": "^8.53.0",
"eslint": "^8.54.0",
"fuse.js": "^7.0.0",
"happy-dom": "^12.10.3",
"histoire": "^0.17.5",
Expand All @@ -90,12 +90,13 @@
"pinia": "^2.1.7",
"postcss": "^8.4.31",
"postcss-nested": "^6.0.1",
"punycode": "^2.3.1",
"release-it": "^17.0.0",
"typescript": "~5.2.2",
"v-calendar": "^3.1.2",
"vite": "^4.5.0",
"vitepress": "1.0.0-rc.25",
"vitest": "^1.0.0-beta.4",
"vite": "^5.0.0",
"vitepress": "1.0.0-rc.29",
"vitest": "^1.0.0-beta.5",
"vue": "^3.3.8",
"vue-router": "^4.2.5",
"vue-tsc": "^1.8.22"
Expand Down
Loading

0 comments on commit 88f3665

Please sign in to comment.