The quick brown fox Qiii
The quick brown fox Qiii
diff --git a/gdn-app/src/components/Test.vue b/gdn-app/src/components/Test.vue new file mode 100644 index 0000000..9ed2fd9 --- /dev/null +++ b/gdn-app/src/components/Test.vue @@ -0,0 +1,10 @@ + + + + Foo is {{ foo.name }}. + + diff --git a/gdn-app/src/main.ts b/gdn-app/src/main.ts index b670de8..0474ef1 100644 --- a/gdn-app/src/main.ts +++ b/gdn-app/src/main.ts @@ -1,4 +1,5 @@ +import { createPinia } from "pinia"; import { createApp } from "vue"; import App from "./App.vue"; -createApp(App).mount("#app"); +createApp(App).use(createPinia()).mount("#app"); diff --git a/gdn-app/src/stores/foo.ts b/gdn-app/src/stores/foo.ts new file mode 100644 index 0000000..392551d --- /dev/null +++ b/gdn-app/src/stores/foo.ts @@ -0,0 +1,12 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +export const useFooStore = defineStore("foo", () => { + const name = ref("foo"); + + function setName(to: string) { + name.value = to; + } + + return { name, setName }; +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3437b1..db526f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: '@tauri-apps/plugin-opener': specifier: ^2.2.5 version: 2.2.5 + pinia: + specifier: ^2.3.1 + version: 2.3.1(typescript@5.7.3)(vue@3.5.13(typescript@5.7.3)) tailwindcss: specifier: ^4.0.0 version: 4.0.0 @@ -692,6 +695,9 @@ packages: '@vue/compiler-vue2@2.7.16': resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} + '@vue/devtools-api@6.6.4': + resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==} + '@vue/devtools-core@7.7.1': resolution: {integrity: sha512-W4CRrSZJodNIfrPO7/dXF6ZS0QyOY6PCYVhpSoTSx9+nh2wpZxcS1482lAdKM0FTlaoApHV6jXT95Me90hSaBA==} peerDependencies: @@ -1060,6 +1066,15 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + pinia@2.3.1: + resolution: {integrity: sha512-khUlZSwt9xXCaTbbxFYBKDc/bWAGWJjOgvxETwkTN7KRm66EeT1ZdZj6i2ceh9sP2Pzqsbc704r2yngBrxBVug==} + peerDependencies: + typescript: '>=4.4.4' + vue: ^2.7.0 || ^3.5.11 + peerDependenciesMeta: + typescript: + optional: true + postcss@8.5.1: resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} @@ -1281,6 +1296,17 @@ packages: vscode-uri@3.0.8: resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + vue-demi@0.14.10: + resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} + engines: {node: '>=12'} + hasBin: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue-tsc@2.2.0: resolution: {integrity: sha512-gtmM1sUuJ8aSb0KoAFmK9yMxb8TxjewmxqTJ1aKphD5Cbu0rULFY6+UQT51zW7SpUcenfPUuflKyVwyx9Qdnxg==} hasBin: true @@ -1870,6 +1896,8 @@ snapshots: de-indent: 1.0.2 he: 1.2.0 + '@vue/devtools-api@6.6.4': {} + '@vue/devtools-core@7.7.1(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.29.1))(vue@3.5.13(typescript@5.7.3))': dependencies: '@vue/devtools-kit': 7.7.1 @@ -2212,6 +2240,16 @@ snapshots: picomatch@4.0.2: {} + pinia@2.3.1(typescript@5.7.3)(vue@3.5.13(typescript@5.7.3)): + dependencies: + '@vue/devtools-api': 6.6.4 + vue: 3.5.13(typescript@5.7.3) + vue-demi: 0.14.10(vue@3.5.13(typescript@5.7.3)) + optionalDependencies: + typescript: 5.7.3 + transitivePeerDependencies: + - '@vue/composition-api' + postcss@8.5.1: dependencies: nanoid: 3.3.8 @@ -2369,6 +2407,10 @@ snapshots: vscode-uri@3.0.8: {} + vue-demi@0.14.10(vue@3.5.13(typescript@5.7.3)): + dependencies: + vue: 3.5.13(typescript@5.7.3) + vue-tsc@2.2.0(typescript@5.7.3): dependencies: '@volar/typescript': 2.4.11