Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Frikadellios committed Jun 6, 2024
1 parent e2cc6fa commit 925799d
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"unifiedjs.vscode-mdx",
"oven.bun-vscode",
"biomejs.biome",
"bradlc.vscode-tailwindcss"
"bradlc.vscode-tailwindcss",
"vue.volar"
],
"unwantedRecommendations": []
}
Binary file modified bun.lockb
Binary file not shown.
6 changes: 6 additions & 0 deletions data.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name = "vue-bun"
version = "1.0.1"

[author]
name = "Hrihorii Ilin"
email = "[email protected]"
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "1.0.1",
"scripts": {
"dev": "bunx --bun astro dev --verbose",
"start": "bun astro check && bunx --bun astro dev --verbose",
"build": "bun astro check && bunx --bun astro build --verbose",
"start": "bun astro check --verbose && bunx --bun astro dev --verbose",
"build": "bun astro check --verbose && bunx --bun astro build --verbose",
"preview": "bunx --bun astro preview",
"biomes": "bunx @biomejs/biome check --apply ./*",
"astro": "astro"
Expand All @@ -27,9 +27,10 @@
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-vue": "^5.0.5",
"@vueuse/core": "^10.10.0",
"astro": "4.9.2",
"astro": "4.9.3",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^3.6.0",
"embla-carousel": "^8.1.3",
"embla-carousel-vue": "^8.1.3",
"lucide-vue-next": "^0.378.0",
Expand Down Expand Up @@ -69,5 +70,5 @@
"url": "https://github.com/Frikadellios/vue-bun/issues"
},
"homepage": "https://github.com/Frikadellios/vue-bun#readme",
"trustedDependencies": ["@biomejs/biome"]
"trustedDependencies": ["@biomejs/biome", "esbuild", "sharp", "vue-demi"]
}
20 changes: 6 additions & 14 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export type {}
export {}
declare global {
const $: typeof import('vue/macros')['$']
const $$: typeof import('vue/macros')['$$']
Expand All @@ -13,6 +13,7 @@ declare global {
const $shallowRef: typeof import('vue/macros')['$shallowRef']
const $toRef: typeof import('vue/macros')['$toRef']
const EffectScope: typeof import('vue')['EffectScope']
const capitalizer: typeof import('./utils/cn')['capitalizer']
const cn: typeof import('./utils/cn')['cn']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
Expand All @@ -21,6 +22,8 @@ declare global {
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const extractSegmentURL: typeof import('./utils/cn')['extractSegmentURL']
const formatDate: typeof import('./utils/cn')['formatDate']
const forwardRef: typeof import('react')['forwardRef']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
Expand Down Expand Up @@ -81,6 +84,7 @@ declare global {
const useState: typeof import('react')['useState']
const useSyncExternalStore: typeof import('react')['useSyncExternalStore']
const useTransition: typeof import('react')['useTransition']
const wait: typeof import('./utils/cn')['wait']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
Expand All @@ -89,18 +93,6 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type {
Component,
ComponentPublicInstance,
ComputedRef,
ExtractDefaultPropTypes,
ExtractPropTypes,
ExtractPublicPropTypes,
InjectionKey,
PropType,
Ref,
VNode,
WritableComputedRef,
} from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'

Check warning on line 96 in src/auto-imports.d.ts

View check run for this annotation

Codeac.io / Codeac Code Quality

max-line-length

Exceeds maximum line length of 120
import('vue')
}
19 changes: 19 additions & 0 deletions src/utils/cn.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import { type ClassValue, clsx } from 'clsx'
import { twMerge } from 'tailwind-merge'
import { format } from 'date-fns'

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}

export function wait(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
}

export function formatDate(date: Date) {
return format(date, 'LLL dd, y')
}

export function extractSegmentURL(path: string) {
if (!path) return ''
if (path === '/') return null
return path.split('/')[1]
}

export function capitalizer(text: string) {
return text.charAt(0).toUpperCase() + text.slice(1)
}

0 comments on commit 925799d

Please sign in to comment.