Skip to content

Commit 34ef843

Browse files
committed
feat: dev playground
1 parent d124efb commit 34ef843

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
node_modules
3-
dev
43

54
# local env files
65
.env

playground/App.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script setup>
2+
import { GoogleMap, AdvancedMarker } from '../src'
3+
4+
const center = { lat: 40.689247, lng: -74.044502 }
5+
const markerOptions = { position: center, title: 'LADY LIBERTY' }
6+
const pinOptions = { background: '#FBBC04' }
7+
</script>
8+
9+
<template>
10+
<GoogleMap mapId="DEMO_MAP_ID" style="width: 100%; height: 500px" :center="center" :zoom="15">
11+
<AdvancedMarker :options="markerOptions" :pin-options="pinOptions" />
12+
</GoogleMap>
13+
</template>

playground/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" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>vue3-google-map</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="./main.ts"></script>
12+
</body>
13+
</html>

playground/main.ts

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

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import vue from "@vitejs/plugin-vue";
66
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
77

88
export default defineConfig({
9-
root: "./dev",
9+
root: "./playground",
1010
plugins: [
1111
vue(),
1212
cssInjectedByJsPlugin({

0 commit comments

Comments
 (0)