Kaynağa Gözat

chore: run dev serve playground and qr code for mobile check

alvarosabu 1 yıl önce
ebeveyn
işleme
59d77a2e97

+ 1 - 0
package.json

@@ -45,6 +45,7 @@
     "access": "public"
   },
   "scripts": {
+    "dev": "cd playground && npm run dev",
     "build": "vite build",
     "playground": "cd playground && npm run dev",
     "test": "vitest",

+ 4 - 1
playground/.eslintrc-auto-import.json

@@ -59,6 +59,9 @@
     "watch": true,
     "watchEffect": true,
     "watchPostEffect": true,
-    "watchSyncEffect": true
+    "watchSyncEffect": true,
+    "ExtractDefaultPropTypes": true,
+    "ExtractPropTypes": true,
+    "ExtractPublicPropTypes": true
   }
 }

+ 1 - 1
playground/auto-imports.d.ts

@@ -61,5 +61,5 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
 }

+ 2 - 1
playground/package.json

@@ -4,7 +4,7 @@
   "version": "0.0.0",
   "private": true,
   "scripts": {
-    "dev": "vite",
+    "dev": "vite --host",
     "build": "vue-tsc && vite build",
     "preview": "vite preview"
   },
@@ -17,6 +17,7 @@
     "@tweakpane/plugin-essentials": "^0.2.0",
     "unplugin-auto-import": "^0.16.7",
     "vite-plugin-glsl": "^1.1.2",
+    "vite-plugin-qrcode": "^0.2.2",
     "vue-tsc": "^1.8.22"
   }
 }

+ 2 - 0
playground/vite.config.ts

@@ -6,6 +6,7 @@ import Components from 'unplugin-vue-components/vite'
 import glsl from 'vite-plugin-glsl'
 import UnoCSS from 'unocss/vite'
 import { templateCompilerOptions } from '@tresjs/core'
+import { qrcode } from 'vite-plugin-qrcode';
 
 // https://vitejs.dev/config/
 export default defineConfig({
@@ -30,6 +31,7 @@ export default defineConfig({
     UnoCSS({
       /* options */
     }),
+    qrcode() // only applies in dev mode
   ],
   resolve: {
     alias: {

+ 18 - 0
pnpm-lock.yaml

@@ -173,6 +173,9 @@ importers:
       vite-plugin-glsl:
         specifier: ^1.1.2
         version: 1.1.2(vite@4.5.0)
+      vite-plugin-qrcode:
+        specifier: ^0.2.2
+        version: 0.2.2(vite@4.5.0)
       vue-tsc:
         specifier: ^1.8.22
         version: 1.8.22(typescript@5.2.2)
@@ -6067,6 +6070,11 @@ packages:
       escape-goat: 4.0.0
     dev: true
 
+  /qrcode-terminal@0.12.0:
+    resolution: {integrity: sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==}
+    hasBin: true
+    dev: true
+
   /querystringify@2.2.0:
     resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
     dev: true
@@ -7383,6 +7391,16 @@ packages:
       - supports-color
     dev: true
 
+  /vite-plugin-qrcode@0.2.2(vite@4.5.0):
+    resolution: {integrity: sha512-FvFOz+gb4Xv4KU8QJK1daIFmMnwBQjsU0g006nufIpaOdwAZLfY5uOimtlHNrrOTmbev0ZQ8lm68iaz4ZEQFdw==}
+    engines: {node: ^14.13.1 || ^16.0.0 || >=18}
+    peerDependencies:
+      vite: ^3.0.0 || ^4.0.0
+    dependencies:
+      qrcode-terminal: 0.12.0
+      vite: 4.5.0(@types/node@20.8.10)
+    dev: true
+
   /vite-plugin-require-transform@1.0.21:
     resolution: {integrity: sha512-A3SrHhVg9tCW35O7E8kcuB71YTEdVd3EaM1zh6gbH4zxy4WzXSfcNf0UiWmaHHhr6wdFhiiAGdpR6S0SUxXkGQ==}
     dependencies: