Session 3

This commit is contained in:
marcgauch committed 2023-01-18 21:58:07 +01:00
1 parent c335f5a31f
commit 65869fbe87
20 files changed
+2750

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+3
View File
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
+29
View File
@@ -0,0 +1,29 @@
# exam
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Compile and Minify for Production
```sh
npm run build
```
+13
View File
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://unpkg.com/chota@latest">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exam App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
+1205
View File
File diff suppressed because it is too large. Load diff
+17
View File
@@ -0,0 +1,17 @@
{
"name": "exam",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.2.45"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.2.0",
"vite": "^3.2.4"
}
}
+34
View File
@@ -0,0 +1,34 @@
<!--
Task: Outsource the "Articles" from this News Site in a child component including Props
for the header and Paragraph Text.
The data for this Articles should come from the Parent SFC.
-->
<template>
<section class="container" id="app">
<h1>News of the day</h1>
<div class="row">
<div class="col">
<Articles header="Winter is coming!" text="Get your gear ready." />
</div>
<div class="col">
<Articles header="Vue.js" text="Version 14 out now!" />
</div>
<div class="col">
<Articles header="Chur" text="Swiss town out of Cheese!" />
</div>
<div class="col">
<Articles header="FHGR" text="Data leaked from University." />
</div>
</div>
</section>
</template>
<script>
import Articles from "./components/Articles.vue";
export default {
components: {
Articles,
},
};
</script>
@@ -0,0 +1,14 @@
<template>
<div class="card">
<header>
<h4>{{ header }}</h4>
</header>
<p>{{ text }}</p>
</div>
</template>
<script>
export default {
props: ["header", "text"],
};
</script>
+5
View File
@@ -0,0 +1,5 @@
import { createApp } from "vue";
import App from "./App.vue";
const app = createApp(App);
app.mount("#app");
+14
View File
@@ -0,0 +1,14 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})