Skip to content

Commit 7aa36e0

Browse files
committed
Add starter for vue3 project
1 parent fa4451d commit 7aa36e0

File tree

16 files changed

+272
-0
lines changed

16 files changed

+272
-0
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar"]
3+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# google-recaptcha-vue3
2+
23
A Vue 3 component for Google Recaptcha

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Vue + TS</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "google-recaptcha-vue3",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vue-tsc -b && vite build",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"vue": "^3.5.13"
13+
},
14+
"devDependencies": {
15+
"@vitejs/plugin-vue": "^5.2.1",
16+
"@vue/tsconfig": "^0.7.0",
17+
"typescript": "~5.7.2",
18+
"vite": "^6.2.0",
19+
"vue-tsc": "^2.2.4"
20+
}
21+
}

public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

src/App.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<script setup lang="ts">
2+
import HelloWorld from './components/HelloWorld.vue'
3+
</script>
4+
5+
<template>
6+
<div>
7+
<a href="https://vite.dev" target="_blank">
8+
<img src="/vite.svg" class="logo" alt="Vite logo" />
9+
</a>
10+
<a href="https://vuejs.org/" target="_blank">
11+
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
12+
</a>
13+
</div>
14+
<HelloWorld msg="Vite + Vue" />
15+
</template>
16+
17+
<style scoped>
18+
.logo {
19+
height: 6em;
20+
padding: 1.5em;
21+
will-change: filter;
22+
transition: filter 300ms;
23+
}
24+
.logo:hover {
25+
filter: drop-shadow(0 0 2em #646cffaa);
26+
}
27+
.logo.vue:hover {
28+
filter: drop-shadow(0 0 2em #42b883aa);
29+
}
30+
</style>

src/assets/vue.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/HelloWorld.vue

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<script setup lang="ts">
2+
import { ref } from 'vue'
3+
4+
defineProps<{ msg: string }>()
5+
6+
const count = ref(0)
7+
</script>
8+
9+
<template>
10+
<h1>{{ msg }}</h1>
11+
12+
<div class="card">
13+
<button type="button" @click="count++">count is {{ count }}</button>
14+
<p>
15+
Edit
16+
<code>components/HelloWorld.vue</code> to test HMR
17+
</p>
18+
</div>
19+
20+
<p>
21+
Check out
22+
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
23+
>create-vue</a
24+
>, the official Vue + Vite starter
25+
</p>
26+
<p>
27+
Learn more about IDE Support for Vue in the
28+
<a
29+
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
30+
target="_blank"
31+
>Vue Docs Scaling up Guide</a
32+
>.
33+
</p>
34+
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
35+
</template>
36+
37+
<style scoped>
38+
.read-the-docs {
39+
color: #888;
40+
}
41+
</style>

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createApp } from 'vue'
2+
import './style.css'
3+
import App from './App.vue'
4+
5+
createApp(App).mount('#app')

0 commit comments

Comments
 (0)