Skip to content

Commit ba90b0d

Browse files
committed
feat: vite package basic setup
1 parent 0683cf5 commit ba90b0d

File tree

17 files changed

+548
-38
lines changed

17 files changed

+548
-38
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build:debug": "NUXT_DEBUG_BUILD=true pnpm -r run build",
99
"watch": "pnpm -r run watch",
1010
"dev": "pnpm -C packages/rolldown run dev",
11+
"dev:vite": "pnpm -C packages/vite run dev",
1112
"docs": "pnpm -C docs run docs",
1213
"docs:build": "pnpm -C docs run docs:build",
1314
"docs:serve": "pnpm -C docs run docs:serve",

packages/vite/package.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name": "@vitejs/devtools-vite",
3+
"type": "module",
4+
"version": "0.0.0-alpha.32",
5+
"private": true,
6+
"description": "DevTools for Vite (work in progress)",
7+
"author": "VoidZero Inc.",
8+
"license": "MIT",
9+
"homepage": "https://github.com/vitejs/devtools#readme",
10+
"repository": {
11+
"directory": "/vite",
12+
"type": "git",
13+
"url": "git+https://github.com/vitejs/devtools.git"
14+
},
15+
"bugs": "https://github.com/vitejs/devtools/issues",
16+
"keywords": [
17+
"vite",
18+
"devtools"
19+
],
20+
"sideEffects": false,
21+
"exports": {
22+
".": "./dist/index.mjs",
23+
"./dirs": "./dist/dirs.mjs",
24+
"./package.json": "./package.json"
25+
},
26+
"types": "./dist/index.d.mts",
27+
"files": [
28+
"dist"
29+
],
30+
"scripts": {
31+
"build": "pnpm dev:prepare && nuxi build src && tsdown",
32+
"build:debug": "NUXT_DEBUG_BUILD=true pnpm run build",
33+
"dev": "DEBUG='vite:devtools:*' ROLLDOWN_OPTIONS_VALIDATION=loose nuxi dev src",
34+
"dev:prepare": "nuxi prepare src",
35+
"prepack": "pnpm build"
36+
},
37+
"dependencies": {
38+
"@floating-ui/dom": "catalog:frontend",
39+
"@vitejs/devtools-kit": "workspace:*",
40+
"@vitejs/devtools-rpc": "workspace:*",
41+
"birpc": "catalog:deps",
42+
"get-port-please": "catalog:deps",
43+
"h3": "catalog:deps",
44+
"ohash": "catalog:deps",
45+
"pathe": "catalog:deps",
46+
"sirv": "catalog:deps",
47+
"structured-clone-es": "catalog:deps",
48+
"ws": "catalog:deps"
49+
},
50+
"devDependencies": {
51+
"@unocss/nuxt": "catalog:build",
52+
"@vueuse/core": "catalog:frontend",
53+
"@vueuse/nuxt": "catalog:build",
54+
"floating-vue": "catalog:frontend",
55+
"tsdown": "catalog:build",
56+
"unocss": "catalog:build"
57+
}
58+
}

packages/vite/src/app/app.vue

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<script setup lang="ts">
2+
import { useHead } from '#app/composables/head'
3+
import './styles/global.css'
4+
import '@vitejs/devtools-ui/composables/dark'
5+
6+
useHead({
7+
title: 'Vite DevTools',
8+
})
9+
10+
const connected = false
11+
</script>
12+
13+
<template>
14+
<VisualLoading
15+
v-if="!connected"
16+
text="Coming Soon..."
17+
/>
18+
<div v-else h-vh>
19+
<NuxtPage />
20+
</div>
21+
</template>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script setup lang="ts">
2+
import VisualLogoBanner from './LogoBanner.vue'
3+
4+
const props = defineProps<{
5+
text?: string
6+
}>()
7+
</script>
8+
9+
<template>
10+
<div p10 h-full flex="~ col" items-center justify-center>
11+
<VisualLogoBanner />
12+
<div flex="~ gap-2" animate-pulse mt--4 items-center justify-center>
13+
<div i-svg-spinners-8-dots-rotate />
14+
<span>{{ props.text ?? 'Loading...' }}</span>
15+
</div>
16+
</div>
17+
</template>
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
<script setup lang="ts">
2+
import { isDark } from '@vitejs/devtools-ui/composables/dark'
3+
import { computed } from 'vue'
4+
5+
const theme = computed(() => isDark.value ? 'white' : 'black')
6+
</script>
7+
8+
<template>
9+
<div class="flex gap-2 group" w140 p4 relative>
10+
<div op10 group-hover="op100" transition duration-800 class="absolute -bottom-[10px] -left-[20px] w-[80px] h-[80px] bg-linear-to-b from-[#61d9ff] to-transparent blur-[30px]" />
11+
<div op10 group-hover="op100" transition duration-800 class="absolute -top-[10px] left-300px w-[80px] h-[80px] bg-[linear-gradient(270deg,_#7a23a1,_#715ebde6_60%,_#715ebde6,_#bd34fe00)] blur-[30px]" />
12+
<svg width="979" height="89" viewBox="0 0 979 89" fill="none" xmlns="http://www.w3.org/2000/svg" pointer-events-none>
13+
<path d="M328.999 86.823C327.739 88.427 325.161 87.535 325.161 85.4973V65.9264C325.161 63.5532 323.238 61.63 320.865 61.63H299.256C297.509 61.63 296.49 59.6537 297.509 58.2339L311.715 38.3438C313.749 35.5001 311.715 31.5474 308.217 31.5474H282.067C280.319 31.5474 279.3 29.5711 280.319 28.1512L298.736 2.36497C299.141 1.80031 299.792 1.46478 300.484 1.46478H355.366C357.113 1.46478 358.132 3.4411 357.114 4.86094L342.907 24.751C340.873 27.5948 342.907 31.5474 346.405 31.5474H368.014C369.806 31.5474 370.813 33.6137 369.704 35.0254L329.003 86.8271L328.999 86.823Z" fill="#9135FF" />
14+
<mask id="mask0_logo" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="279" y="1" width="91" height="87">
15+
<path d="M328.801 86.8227C327.541 88.4266 324.963 87.5346 324.963 85.4969V65.9261C324.963 63.5528 323.04 61.6297 320.666 61.6297H299.058C297.311 61.6297 296.292 59.6534 297.311 58.2335L311.517 38.3435C313.551 35.4997 311.517 31.5471 308.019 31.5471H281.868C280.121 31.5471 279.102 29.5708 280.121 28.1509L298.538 2.36463C298.943 1.79997 299.594 1.46445 300.285 1.46445H355.168C356.915 1.46445 357.934 3.44077 356.915 4.86061L342.709 24.7507C340.675 27.5944 342.709 31.5471 346.207 31.5471H367.816C369.608 31.5471 370.615 33.6134 369.506 35.0251L328.805 86.8268L328.801 86.8227Z" fill="black" />
16+
</mask>
17+
<g mask="url(#mask0_logo)">
18+
<g filter="url(#filter0_f_logo)">
19+
<ellipse cx="10.4623" cy="27.9302" rx="10.4623" ry="27.9302" transform="matrix(0.00324134 0.999995 0.999995 -0.00324134 271.227 61.3274)" fill="#EEE6FF" />
20+
</g>
21+
<g filter="url(#filter1_f_logo)">
22+
<ellipse cx="19.7534" cy="56.7016" rx="19.7534" ry="56.7016" transform="matrix(0.00324134 0.999995 0.999995 -0.00324134 205.013 16.4374)" fill="#EEE6FF" />
23+
</g>
24+
<g filter="url(#filter2_f_logo)">
25+
<ellipse cx="10.4623" cy="57.9085" rx="10.4623" ry="57.9085" transform="matrix(0.00324134 0.999995 0.999995 -0.00324134 202.85 22.9685)" fill="#8900FF" />
26+
</g>
27+
<g filter="url(#filter3_f_logo)">
28+
<ellipse cx="10.4623" cy="58.1208" rx="10.4623" ry="58.1208" transform="matrix(0.00324134 0.999995 0.999995 -0.00324134 211.578 57.1575)" fill="#8900FF" />
29+
</g>
30+
<g filter="url(#filter4_f_logo)">
31+
<ellipse cx="10.4623" cy="58.1208" rx="10.4623" ry="58.1208" transform="matrix(0.00324134 0.999995 0.999995 -0.00324134 214.489 59.3398)" fill="#8900FF" />
32+
</g>
33+
<g filter="url(#filter5_f_logo)">
34+
<ellipse cx="26.7282" cy="41.937" rx="26.7282" ry="41.937" transform="matrix(0.0584509 -0.99829 -0.99829 -0.0584509 420.939 52.4903)" fill="#EEE6FF" />
35+
</g>
36+
<g filter="url(#filter6_f_logo)">
37+
<ellipse cx="6.59178" cy="40.8401" rx="6.59178" ry="40.8401" transform="matrix(-0.0172986 -0.99985 -0.99985 0.0172986 423.684 35.7737)" fill="#8900FF" />
38+
</g>
39+
<g filter="url(#filter7_f_logo)">
40+
<ellipse cx="6.59178" cy="40.8401" rx="6.59178" ry="40.8401" transform="matrix(-0.0172986 -0.99985 -0.99985 0.0172986 423.684 35.7737)" fill="#8900FF" />
41+
</g>
42+
<g filter="url(#filter8_f_logo)">
43+
<ellipse cx="280.451" cy="18.5056" rx="8.37029" ry="55.2889" transform="rotate(39.5103 280.451 18.5056)" fill="#8900FF" />
44+
</g>
45+
<g filter="url(#filter9_f_logo)">
46+
<ellipse cx="369.984" cy="-10.1065" rx="8.37029" ry="55.2889" transform="rotate(37.8923 369.984 -10.1065)" fill="#8900FF" />
47+
</g>
48+
<g filter="url(#filter10_f_logo)">
49+
<ellipse cx="358.377" cy="13.4947" rx="11.3426" ry="18.3586" transform="rotate(37.8923 358.377 13.4947)" fill="#00C2FF" />
50+
</g>
51+
<g filter="url(#filter11_f_logo)">
52+
<ellipse cx="276.147" cy="74.2747" rx="8.37029" ry="55.2889" transform="rotate(37.8923 276.147 74.2747)" fill="#8900FF" />
53+
</g>
54+
<g filter="url(#filter12_f_logo)">
55+
<ellipse cx="276.147" cy="74.2747" rx="8.37029" ry="55.2889" transform="rotate(37.8923 276.147 74.2747)" fill="#8900FF" />
56+
</g>
57+
<g filter="url(#filter13_f_logo)">
58+
<ellipse cx="347.434" cy="58.2714" rx="8.37029" ry="55.2889" transform="rotate(37.8923 347.434 58.2714)" fill="#8900FF" />
59+
</g>
60+
<g filter="url(#filter14_f_logo)">
61+
<ellipse cx="352.689" cy="63.0069" rx="11.3426" ry="29.0568" transform="rotate(37.8923 352.689 63.0069)" fill="#00C2FF" />
62+
</g>
63+
</g>
64+
<path d="M265.911 0C248.439 25.0088 248.337 63.7742 265.911 88.8731H277.716C260.146 63.7742 260.248 25.0088 277.716 0H265.911Z" :fill="theme" />
65+
<path d="M383.972 9.15527e-05H372.167C389.639 25.0089 389.741 63.7743 372.167 88.8732H383.972C401.542 63.7743 401.44 25.0089 383.972 9.15527e-05Z" :fill="theme" />
66+
<path d="M423.64 75V19H458.84C478.28 19 489.4 27.88 489.4 47C489.4 66.2 478.2 75 458.76 75H423.64ZM469.72 47C469.72 36.52 465.24 32.6 456.12 32.6H442.84V61.4H456.12C465.24 61.4 469.72 57.48 469.72 47ZM499.187 75V19H554.467V32.6H518.387V40.12H553.907V53.32H518.387V61.4H555.507V75H499.187ZM579.751 19L594.551 59.32L609.111 19H629.031L606.951 75H581.351L559.271 19H579.751ZM653.236 75V32.76H631.716V19H693.956V32.76H672.436V75H653.236ZM731.745 75.96C708.145 75.96 695.825 66.04 695.825 47C695.825 27.96 708.145 18.04 731.745 18.04C755.345 18.04 767.745 27.96 767.745 47C767.745 66.04 755.345 75.96 731.745 75.96ZM731.745 62.12C742.865 62.12 748.065 57.4 748.065 47C748.065 36.52 742.865 31.8 731.745 31.8C720.625 31.8 715.425 36.52 715.425 47C715.425 57.4 720.625 62.12 731.745 62.12ZM809.948 75.96C786.348 75.96 774.028 66.04 774.028 47C774.028 27.96 786.348 18.04 809.948 18.04C833.548 18.04 845.948 27.96 845.948 47C845.948 66.04 833.548 75.96 809.948 75.96ZM809.948 62.12C821.068 62.12 826.268 57.4 826.268 47C826.268 36.52 821.068 31.8 809.948 31.8C798.828 31.8 793.628 36.52 793.628 47C793.628 57.4 798.828 62.12 809.948 62.12ZM855.671 75V19H874.871V61H908.391V75H855.671ZM944.226 75.96C921.346 75.96 911.666 70.04 911.666 56.28V56.2H931.106V56.28C931.106 60.92 934.226 63.4 944.226 63.4C954.546 63.4 956.946 61.48 956.946 58.52C956.946 55.88 955.186 54.68 951.346 54.36L935.026 53.08C917.746 51.72 912.466 46.44 912.466 36.36C912.466 24.2 923.026 18.04 944.546 18.04C966.546 18.04 975.426 23.72 975.426 36.84V37H956.306V36.84C956.306 32.2 953.426 30.44 944.226 30.44C934.546 30.44 931.586 32.2 931.586 35.32C931.586 38.04 933.746 39.08 938.786 39.48L954.946 40.68C970.146 41.8 976.386 46.68 976.386 57.16C976.386 69.24 967.346 75.96 944.226 75.96Z" :fill="theme" />
67+
<path d="M20.72 19L35.52 59.32L50.08 19H70L47.92 75H22.32L0.24 19H20.72ZM76.64 75V19H95.84V75H76.64ZM124.361 75V32.76H102.841V19H165.081V32.76H143.561V75H124.361ZM172.109 75V19H227.389V32.6H191.309V40.12H226.829V53.32H191.309V61.4H228.429V75H172.109Z" :fill="theme" />
68+
<defs>
69+
<filter id="filter0_f_logo" x="242.164" y="32.1395" width="114.054" height="79.1192" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
70+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
71+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
72+
<feGaussianBlur stdDeviation="14.5485" result="effect1_foregroundBlur_logo" />
73+
</filter>
74+
<filter id="filter1_f_logo" x="175.98" y="-12.8443" width="171.597" height="97.7023" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
75+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
76+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
77+
<feGaussianBlur stdDeviation="14.5485" result="effect1_foregroundBlur_logo" />
78+
</filter>
79+
<filter id="filter2_f_logo" x="185.426" y="5.32093" width="150.733" height="55.8442" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
80+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
81+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
82+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
83+
</filter>
84+
<filter id="filter3_f_logo" x="194.154" y="39.5092" width="151.157" height="55.8443" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
85+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
86+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
87+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
88+
</filter>
89+
<filter id="filter4_f_logo" x="197.064" y="41.6914" width="151.157" height="55.8443" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
90+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
91+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
92+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
93+
</filter>
94+
<filter id="filter5_f_logo" x="309.644" y="-32.5371" width="141.984" height="111.787" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
95+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
96+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
97+
<feGaussianBlur stdDeviation="14.5485" result="effect1_foregroundBlur_logo" />
98+
</filter>
99+
<filter id="filter6_f_logo" x="324.444" y="5.80213" width="116.585" height="48.1746" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
100+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
101+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
102+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
103+
</filter>
104+
<filter id="filter7_f_logo" x="324.444" y="5.80213" width="116.585" height="48.1746" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
105+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
106+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
107+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
108+
</filter>
109+
<filter id="filter8_f_logo" x="227.223" y="-41.9441" width="106.456" height="120.899" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
110+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
111+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
112+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
113+
</filter>
114+
<filter id="filter9_f_logo" x="317.926" y="-71.5028" width="104.117" height="122.793" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
115+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
116+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
117+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
118+
</filter>
119+
<filter id="filter10_f_logo" x="326.522" y="-20.0431" width="63.7106" height="67.0755" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
120+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
121+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
122+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
123+
</filter>
124+
<filter id="filter11_f_logo" x="224.088" y="12.8784" width="104.117" height="122.793" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
125+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
126+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
127+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
128+
</filter>
129+
<filter id="filter12_f_logo" x="224.088" y="12.8784" width="104.117" height="122.793" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
130+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
131+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
132+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
133+
</filter>
134+
<filter id="filter13_f_logo" x="295.376" y="-3.12496" width="104.117" height="122.793" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
135+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
136+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
137+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
138+
</filter>
139+
<filter id="filter14_f_logo" x="315.262" y="21.5769" width="74.8554" height="82.8601" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
140+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
141+
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
142+
<feGaussianBlur stdDeviation="8.72909" result="effect1_foregroundBlur_logo" />
143+
</filter>
144+
</defs>
145+
</svg>
146+
</div>
147+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<div p10 flex="~ col" items-center justify-center>
3+
<h1 text-2xl font-bold>
4+
Vite DevTools
5+
</h1>
6+
</div>
7+
</template>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
html, body , #__nuxt{
2+
height: 100vh;
3+
margin: 0;
4+
padding: 0;
5+
}
6+
7+
.bg-dots {
8+
background-image: url('/dot-grid-light.png');
9+
background-size: 50px;
10+
background-repeat: repeat;
11+
}
12+
13+
.dark .bg-dots,
14+
.bg-dots.dark {
15+
color-scheme: dark;
16+
background-color: black;
17+
background-image: url('/dot-grid-dark.png');
18+
}
19+
20+
html {
21+
--uno: bg-base font-sans;
22+
}
23+
body {
24+
--uno: color-base;
25+
}
26+
27+
/* For Scrollbar */
28+
::-webkit-scrollbar {
29+
width: 6px;
30+
}
31+
32+
::-webkit-scrollbar:horizontal {
33+
height: 6px;
34+
}
35+
36+
::-webkit-scrollbar-corner {
37+
background: transparent;
38+
}
39+
40+
::-webkit-scrollbar-thumb {
41+
background-color: #8884;
42+
transition: background 0.2s ease;
43+
border-radius: 1px;
44+
}
45+
46+
::-webkit-scrollbar-thumb:hover {
47+
background-color: #8885;
48+
}
49+
50+
::-webkit-scrollbar-track {
51+
border-radius: 1px;
52+
background: transparent;
53+
}

packages/vite/src/dirs.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { fileURLToPath } from 'node:url'
2+
3+
export const clientPublicDir: string = fileURLToPath(new URL('../dist/public', import.meta.url))

packages/vite/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {}

0 commit comments

Comments
 (0)