From 7be11d211fdec5e368a7253891ba03ae751bd451 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 25 Oct 2021 16:18:18 -0400 Subject: [PATCH] Migrate to Vue 3.2 and vite --- index.html | 14 +++++-- index.ts | 7 ---- package.json | 19 ++++++--- App.vue => src/App.vue | 20 ++++++---- AssetLabel.vue => src/AssetLabel.vue | 39 ++++++++++--------- .../ComputersLabelText.vue | 38 +++++++++--------- src/index.ts | 6 +++ snipeit.d.ts => src/snipeit.d.ts | 0 tsconfig.json | 15 +++++-- vite.config.ts | 7 ++++ 10 files changed, 99 insertions(+), 66 deletions(-) delete mode 100644 index.ts rename App.vue => src/App.vue (55%) rename AssetLabel.vue => src/AssetLabel.vue (69%) rename ComputersLabelText.vue => src/ComputersLabelText.vue (54%) create mode 100644 src/index.ts rename snipeit.d.ts => src/snipeit.d.ts (100%) create mode 100644 vite.config.ts diff --git a/index.html b/index.html index a0434ae..ad9316c 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,10 @@ - -
- - + + + + + + +
+ + + diff --git a/index.ts b/index.ts deleted file mode 100644 index 0ee0609..0000000 --- a/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue'; - -import App from './App'; - -let app = new Vue({ - render: (h) => h(App), -}).$mount('#app'); diff --git a/package.json b/package.json index 816c9fa..8d8ff02 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,20 @@ "jsbarcode": "^3.11.0", "number-to-words": "^1.2.4", "qrcode": "^1.4.4", - "vue": "^2.6.11", - "vue-hot-reload-api": "^2.3.4", - "vue-property-decorator": "^8.4.0" + "vue": "^3.2.20" }, "devDependencies": { - "@vue/component-compiler-utils": "^3.1.1", - "typescript": "^3.8.3", - "vue-template-compiler": "^2.6.11" + "@types/number-to-words": "^1.2.1", + "@types/qrcode": "^1.4.1", + "@vitejs/plugin-vue": "^1.9.3", + "typescript": "^4.4.4", + "vite": "^2.6.11", + "vue-tsc": "^0.28.8" + }, + "scripts": { + "start": "npm run dev", + "dev": "vite", + "build": "vue-tsc --noEmit && vite build", + "serve": "vite preview" } } diff --git a/App.vue b/src/App.vue similarity index 55% rename from App.vue rename to src/App.vue index b757a3a..1597fc3 100644 --- a/App.vue +++ b/src/App.vue @@ -5,23 +5,27 @@ :asset="asset" :key="asset.id" > - + - diff --git a/AssetLabel.vue b/src/AssetLabel.vue similarity index 69% rename from AssetLabel.vue rename to src/AssetLabel.vue index 8786ebf..1cef404 100644 --- a/AssetLabel.vue +++ b/src/AssetLabel.vue @@ -14,35 +14,36 @@ -