adding vue and tailwind

master
Drew Bednar 3 years ago
parent 9fc77acdeb
commit 03e63d43fc

@ -1,12 +1,12 @@
IMAGE_NAME=registry.runcible.io/demo-helm IMAGE_NAME=registry.runcible.io/demo-helm
IMAGE_VERSION=1.0.1 IMAGE_VERSION=1.1.0
push-app-image: build-app-image push-app-image: build-app-image
docker push $(IMAGE_NAME):$(IMAGE_VERSION) docker push $(IMAGE_NAME):$(IMAGE_VERSION)
build-app-image: build-app-image:
docker build -t $(IMAGE_NAME):$(IMAGE_VERSION) ./app docker build -t $(IMAGE_NAME):$(IMAGE_VERSION) ./app/backend
check: check:
echo $(IMAGE_NAME):$(IMAGE_VERSION) echo $(IMAGE_NAME):$(IMAGE_VERSION)

@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local

@ -0,0 +1,3 @@
{
"recommendations": ["johnsoncodehk.volar"]
}

@ -0,0 +1,7 @@
# Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Demo helm</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,20 @@
{
"name": "app",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"dependencies": {
"vue": "^3.2.16"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.9.3",
"autoprefixer": "^10.3.7",
"axios": "^0.22.0",
"postcss": "^8.3.9",
"tailwindcss": "^2.2.16",
"vite": "^2.6.4"
}
}

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -0,0 +1,12 @@
<script setup>
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<HelloWorld msg="Demo-helm" />
</template>
<style>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

@ -0,0 +1,31 @@
<script>
import AppService from '../services/AppService.js'
export default {
data() {
return {
msg: null
}
},
created() {
AppService.getPing()
.then(response => {
console.log("Got some data!")
this.msg = response.data
})
.catch(error => {
console.log(error)
})
},
}
</script>
<template>
<div class="text-center">
<h1 class="text-8xl">Demo Helm</h1>
<p>This comes from the backend api: {{ msg }}</p>
</div>
</template>
<style scoped>
</style>

@ -0,0 +1,4 @@
/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

@ -0,0 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
createApp(App).mount('#app')

@ -0,0 +1,19 @@
import axios from 'axios'
const apiClient = axios.create({
baseURL: 'http://backend.runcible.io',
withCredentials: false,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
}
})
export default {
getPing() {
return apiClient.get('/ping')
},
// getEnv() {
// return apiClient.get('/env')
// }
}

@ -0,0 +1,11 @@
module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()]
})

@ -1,7 +1,9 @@
import os import os
from flask import Flask from flask import Flask
from flask_cors import CORS
app = Flask(__name__) app = Flask(__name__)
cors = CORS(app)
__version__ = "1.0.0" __version__ = "1.0.0"

@ -0,0 +1,3 @@
flask==2.0.2
gunicorn==20.1.0
flask-cors==3.0.10

@ -1,2 +0,0 @@
flask==2.0.2
gunicorn==20.1.0

@ -1,7 +1,7 @@
--- ---
apiVersion: v2 apiVersion: v2
name: demo-helm name: demo-helm
appVersion: 1.0.1 appVersion: 1.1.0
description: A Helm chart to practice helm description: A Helm chart to practice helm
version: 0.1.1 version: 0.2.0
type: application type: application

@ -13,7 +13,7 @@ spec:
app: backend app: backend
spec: spec:
containers: containers:
- image: registry.runcible.io/demo-helm:1.0.1 - image: registry.runcible.io/demo-helm:1.1.0
imagePullPolicy: Always imagePullPolicy: Always
name: backend name: backend
ports: ports:

Loading…
Cancel
Save