From 3d680d625451475f0afe9b83ab1d74867b38da38 Mon Sep 17 00:00:00 2001 From: Camden Mecklem Date: Tue, 6 Aug 2024 20:01:50 -0400 Subject: [PATCH] replace unhead --- index.html | 56 ++++++++++++++------------- package-lock.json | 98 ++++++----------------------------------------- package.json | 2 +- src/App.vue | 17 -------- src/main.ts | 4 -- vite.config.ts | 7 +++- 6 files changed, 48 insertions(+), 136 deletions(-) diff --git a/index.html b/index.html index 9d6d380..eacd2de 100644 --- a/index.html +++ b/index.html @@ -1,27 +1,31 @@ - - - - - - Topsters 3 - - - - - - - - - - - - - - -
- - - + + + + + + + Topsters 3 + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0aba9e2..9357e1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "name": "topstersorg", "version": "1.0.0", "dependencies": { - "@unhead/vue": "^1.9.16", "bootstrap-icons-vue": "^1.11.3", "fflate": "^0.8.2", "topster": "^5.3.0", @@ -28,6 +27,7 @@ "eslint-plugin-vue": "^9.27.0", "typescript": "^5.5.3", "vite": "^5.3.4", + "vite-plugin-radar": "^0.9.6", "vue-tsc": "^2.0.26" } }, @@ -1001,62 +1001,6 @@ "dev": true, "license": "ISC" }, - "node_modules/@unhead/dom": { - "version": "1.9.16", - "resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.9.16.tgz", - "integrity": "sha512-aZIAnnc89Csi1vV4mtlHYI765B7m1yuaXUuQiYHwr6glE9FLyy2X87CzEci4yPH/YbkKm0bGQRfcxXq6Eq0W7g==", - "license": "MIT", - "dependencies": { - "@unhead/schema": "1.9.16", - "@unhead/shared": "1.9.16" - }, - "funding": { - "url": "https://github.com/sponsors/harlan-zw" - } - }, - "node_modules/@unhead/schema": { - "version": "1.9.16", - "resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.9.16.tgz", - "integrity": "sha512-V2BshX+I6D2wN4ys5so8RQDUgsggsxW9FVBiuQi4h8oPWtHclogxzDiHa5BH2TgvNIoUxLnLYNAShMGipmVuUw==", - "license": "MIT", - "dependencies": { - "hookable": "^5.5.3", - "zhead": "^2.2.4" - }, - "funding": { - "url": "https://github.com/sponsors/harlan-zw" - } - }, - "node_modules/@unhead/shared": { - "version": "1.9.16", - "resolved": "https://registry.npmjs.org/@unhead/shared/-/shared-1.9.16.tgz", - "integrity": "sha512-pfJnArULCY+GBr7OtYyyxihRiQLkT31TpyK6nUKIwyax4oNOGyhNfk0RFzNq16BwLg60d1lrc5bd5mZGbfClMA==", - "license": "MIT", - "dependencies": { - "@unhead/schema": "1.9.16" - }, - "funding": { - "url": "https://github.com/sponsors/harlan-zw" - } - }, - "node_modules/@unhead/vue": { - "version": "1.9.16", - "resolved": "https://registry.npmjs.org/@unhead/vue/-/vue-1.9.16.tgz", - "integrity": "sha512-kpMWWwm8cOwo4gw4An43pz30l2CqNtmJpX5Xsu79rwf6Viq8jHAjk6BGqyKy220M2bpa0Va4fnR532SgGO1YgQ==", - "license": "MIT", - "dependencies": { - "@unhead/schema": "1.9.16", - "@unhead/shared": "1.9.16", - "hookable": "^5.5.3", - "unhead": "1.9.16" - }, - "funding": { - "url": "https://github.com/sponsors/harlan-zw" - }, - "peerDependencies": { - "vue": ">=2.7 || >=3" - } - }, "node_modules/@vitejs/plugin-vue": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz", @@ -2889,12 +2833,6 @@ "he": "bin/he" } }, - "node_modules/hookable": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", - "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", - "license": "MIT" - }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -4160,21 +4098,6 @@ "optional": true, "peer": true }, - "node_modules/unhead": { - "version": "1.9.16", - "resolved": "https://registry.npmjs.org/unhead/-/unhead-1.9.16.tgz", - "integrity": "sha512-FOoXkuRNDwt7PUaNE0LXNCb6RCz4vTpkGymz4tJ8rcaG5uUJ0lxGK536hzCFwFw3Xkp3n+tkt2yCcbAZE/FOvA==", - "license": "MIT", - "dependencies": { - "@unhead/dom": "1.9.16", - "@unhead/schema": "1.9.16", - "@unhead/shared": "1.9.16", - "hookable": "^5.5.3" - }, - "funding": { - "url": "https://github.com/sponsors/harlan-zw" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -4248,6 +4171,16 @@ } } }, + "node_modules/vite-plugin-radar": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/vite-plugin-radar/-/vite-plugin-radar-0.9.6.tgz", + "integrity": "sha512-tLvUt7+iZznxYa8GmCrZBV3Q0fLQApsyg9EIJgaen8DjGky3vFIq9KoDWAoVMs9FZ5qbsSBb3YfSvoqwVV+5xw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + } + }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", @@ -4410,15 +4343,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zhead": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/zhead/-/zhead-2.2.4.tgz", - "integrity": "sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/harlan-zw" - } } } } diff --git a/package.json b/package.json index 293cf59..a65a934 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "lint": "eslint ." }, "dependencies": { - "@unhead/vue": "^1.9.16", "bootstrap-icons-vue": "^1.11.3", "fflate": "^0.8.2", "topster": "^5.3.0", @@ -30,6 +29,7 @@ "eslint-plugin-vue": "^9.27.0", "typescript": "^5.5.3", "vite": "^5.3.4", + "vite-plugin-radar": "^0.9.6", "vue-tsc": "^2.0.26" } } diff --git a/src/App.vue b/src/App.vue index bede1ab..3729bcb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,25 +2,8 @@ import { onMounted } from 'vue' import Home from './Home.vue' import { redirectUsers } from './helpers/redirect' -import { useHead } from '@unhead/vue' import './global.css' -useHead({ - script: [ - { - innerHTML: ` -window.dataLayer = window.dataLayer || []; -function gtag(){dataLayer.push(arguments);} -gtag('js', new Date()); - -gtag('config', '${import.meta.env.VITE_GOOGLE_ANALYTICS_TAG}');` - }, - { - src: `https://www.googletagmanager.com/gtag/js?id=${import.meta.env.VITE_GOOGLE_ANALYTICS_TAG}` - } - ] -}) - onMounted(async () => { // Redirect new users to topsters.org if (window.location.href.includes('ostrakon.xyz')) { diff --git a/src/main.ts b/src/main.ts index 34527c2..4708433 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,7 @@ import { createApp } from 'vue' import App from './App.vue' import { store, key } from './store' -import { createHead } from '@unhead/vue' - -const head = createHead() createApp(App) .use(store, key) - .use(head) .mount('#app') diff --git a/vite.config.ts b/vite.config.ts index 315212d..ed6e5d4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,12 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import { VitePluginRadar } from 'vite-plugin-radar' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()] + plugins: [vue(), VitePluginRadar({ + analytics: { + id: 'G-4GL8BY0YV1' + } + })] })