Skip to content

Commit 7f7bd80

Browse files
committed
workflow
1 parent de299bc commit 7f7bd80

9 files changed

Lines changed: 86 additions & 15 deletions

File tree

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository
2+
custom: https://www.buymeacoffee.com/hapytex

.github/workflows/build-site.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
jobs:
2+
linux1:
3+
name: Build site
4+
runs-on: ubuntu-latest
5+
steps:
6+
- name: Use Node.js
7+
uses: actions/setup-node@v4
8+
with:
9+
node-version: '20.x'
10+
- name: checkout code
11+
uses: actions/checkout@v2.3.1
12+
- name: build the site
13+
run: make
14+
linux3:
15+
name: Deploy website
16+
runs-on: ubuntu-latest
17+
needs: [linux1, linux2]
18+
if: github.ref == 'refs/heads/master'
19+
steps:
20+
- name: Use Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
- name: checkout code
25+
uses: actions/checkout@v2.3.1
26+
- name: build the site
27+
run: make
28+
- name: deploy site to gh-pages
29+
uses: JamesIves/github-pages-deploy-action@4.0.0
30+
with:
31+
branch: gh-pages
32+
folder: dist
33+
single-commit: true

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
"chart.js": "3.3.2",
1313
"csv-parser": "^3.2.0",
1414
"json-tree-view-vue3": "^1.0.2",
15+
"primeflex": "^4.0.0",
1516
"primeicons": "^7.0.0",
1617
"primevue": "^4.3.1",
1718
"tailwindcss-primeui": "^0.5.0",
1819
"vue": "^3.4.34",
20+
"vue-papa-parse": "^3.1.0",
1921
"vue-router": "^4.4.0"
2022
},
2123
"devDependencies": {

src/layout/AppMenu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const model = ref([
1212
label: 'JSON tools',
1313
items: [
1414
{ label: 'jsontree', icon: 'pi pi-code', to: '/json/tree' },
15-
{ label: 'csv2json', icon: 'pi pi-code', to: '/json/csv' },
15+
// { label: 'csv2json', icon: 'pi pi-code', to: '/json/csv' },
1616
// { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/uikit/input' },
1717
// { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/uikit/button', class: 'rotated-icon' },
1818
// { label: 'Table', icon: 'pi pi-fw pi-table', to: '/uikit/table' },

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import PrimeVue from 'primevue/config';
77
import ConfirmationService from 'primevue/confirmationservice';
88
import ToastService from 'primevue/toastservice';
99
import { JsonTreeView } from "json-tree-view-vue3";
10-
import { definePreset } from '@primeuix/themes';
10+
// import { definePreset } from '@primeuix/themes';
1111

1212
import '@/assets/styles.scss';
13+
import 'primeflex/primeflex.css';
1314

1415
const app = createApp(App);
1516

src/router/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import AppLayout from '@/layout/AppLayout.vue';
2-
import { createRouter, createWebHistory } from 'vue-router';
2+
import { createRouter, createWebHashHistory } from 'vue-router';
33

44
const router = createRouter({
5-
history: createWebHistory(),
5+
history: createWebHashHistory(),
66
routes: [
77
{
88
path: '/',
99
component: AppLayout,
1010
children: [
11-
{
12-
path: '/json/csv',
13-
name: 'csv2json',
14-
component: () => import('@/views/pages/json/CsvJson.vue')
15-
},
11+
// {
12+
// path: '/json/csv',
13+
// name: 'csv2json',
14+
// component: () => import('@/views/pages/json/CsvJson.vue')
15+
// },
1616
{
1717
path: '/json/tree',
1818
name: 'jsontree',

src/views/pages/json/CsvJson.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup>
22
import { JsonTreeView } from "json-tree-view-vue3";
3-
import 'json-tree-view-vue3/dist/style.css'
4-
import csvParser from "csv-parser";
3+
import 'json-tree-view-vue3/dist/style.css';
54
</script>
65

76
<template>
@@ -25,8 +24,10 @@ export default {
2524
if(this.csv == null) {
2625
return 'null';
2726
}
28-
console.log(this.csvparser(this.csv));
29-
return JSON.stringify(this.csv.split(/\r?\n/));
27+
return 'null';
28+
// return JSON.stringify(this.$papa.parse(this.csv));
29+
// console.log(this.csvparser(this.csv));
30+
// return JSON.stringify(this.csv.split(/\r?\n/));
3031
}
3132
}
3233
}

src/views/pages/json/JsonTree.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ import 'json-tree-view-vue3/dist/style.css';
55

66
<template>
77
<div className="card">
8-
<div class="font-semibold text-xl mb-4">CSV to JSON</div>
9-
<Textarea :invalid="jsondata == null" v-model="json"/>
8+
<div class="font-semibold text-xl mb-4">JSON tree viewer</div>
9+
<div class="grid">
10+
<div class="col field">
11+
<FloatLabel>
12+
<label for="json">JSON</label>
13+
<Textarea id="json" auto-resize rows="25" :invalid="jsondata == null" v-model="json" class="w-full h-full"/>
14+
</FloatLabel>
15+
</div>
16+
<div class="col">
1017
<JsonTreeView :json="jsondata" :maxDepth="3" />
18+
</div>
19+
</div>
1120
</div>
1221
</template>
1322

0 commit comments

Comments
 (0)