From 8c678bedbe63974416c95f9a494d90a5601b540f Mon Sep 17 00:00:00 2001 From: Ernest Teluk <49727996+ErnestTeluk@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:37:48 +0200 Subject: [PATCH] add playground to docs, and google analytics to it (#46) --- README.md | 1 + playground/package-lock.json | 12 +++++++++++- playground/package.json | 3 ++- playground/vite.config.ts | 8 +++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc43f4a..6c64cc8 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Contribute | Usage | Documentation | + Playground | FAQ

diff --git a/playground/package-lock.json b/playground/package-lock.json index 078b512..ac743d3 100644 --- a/playground/package-lock.json +++ b/playground/package-lock.json @@ -25,7 +25,8 @@ "lz-string": "1.5.0", "prettier": "2.8.8", "typescript": "5.1.3", - "vite": "4.4.5" + "vite": "4.4.5", + "vite-plugin-radar": "0.9.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -4964,6 +4965,15 @@ } } }, + "node_modules/vite-plugin-radar": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/vite-plugin-radar/-/vite-plugin-radar-0.9.3.tgz", + "integrity": "sha512-o/7F0gHQW9yUxpExXYwQLxFYOSxiWIPs3Uh24sg+wl5ikghzLKMQ2Xldak/rsT0o06rzdrAqP9+XSOwfCbwz2Q==", + "dev": true, + "peerDependencies": { + "vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/playground/package.json b/playground/package.json index 16b8983..3fe314e 100644 --- a/playground/package.json +++ b/playground/package.json @@ -28,6 +28,7 @@ "lz-string": "1.5.0", "prettier": "2.8.8", "typescript": "5.1.3", - "vite": "4.4.5" + "vite": "4.4.5", + "vite-plugin-radar": "0.9.3" } } diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 3e28d43..3d16bba 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -1,8 +1,14 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react-swc' +import { vitePluginRadar } from 'vite-plugin-radar' // https://vitejs.dev/config/ export default defineConfig({ base: '/sparrowql/', - plugins: [react()], + plugins: [react(), vitePluginRadar({ + enableDev: false, + gtm: { + id: 'G-ZDM0DBJJVX' + } + })], })