add pug template plugin

This commit is contained in:
Frieder Schlesier 2023-02-13 19:05:56 +01:00
parent ef5e4acb90
commit b4b4467661
4 changed files with 33 additions and 2 deletions

View File

@ -17,6 +17,7 @@
"prisma": "^4.9.0", "prisma": "^4.9.0",
"typescript": "^4.9.3", "typescript": "^4.9.3",
"vite": "^4.0.0", "vite": "^4.0.0",
"vite-plugin-pug": "^0.3.2",
"vue-tsc": "^1.0.11" "vue-tsc": "^1.0.11"
} }
} }

View File

@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue' import HelloWorld from './components/HelloWorld.vue'
import EventNew from './components/EventNew.vue' import EventNew from './components/EventNew.vue'
import EventList from './components/EventList.vue';
</script> </script>
<template> <template>
@ -14,6 +15,7 @@ import EventNew from './components/EventNew.vue'
</div> </div>
<!-- <HelloWorld msg="Vite + Vue" /> --> <!-- <HelloWorld msg="Vite + Vue" /> -->
<EventNew msg="Neues GemeindeEvent erstellen" /> <EventNew msg="Neues GemeindeEvent erstellen" />
<EventList msg="this my list" />
</template> </template>
<style scoped> <style scoped>

View File

@ -0,0 +1,22 @@
<script setup lang="ts">
import { ref } from 'vue'
import { ICommuniEvent } from '../interfaces/CommuniEvents';
import event_response from '../fixtures/communi-app-examples.json'
defineProps<{ msg: string }>()
const count = ref(0)
const EventList = ref<Array<ICommuniEvent>>([])
</script>
<template lang="pug">
h1 {{ msg }}
div(class="card") my card content
</template>
<style scoped>
.read-the-docs {
color: #888;
}
</style>

View File

@ -1,7 +1,13 @@
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import pugPlugin from "vite-plugin-pug"
const options = {}
const locals = { name: "My Pug" }
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [
vue(),
pugPlugin(options, locals)],
}) })