Skip to content

Commit 36f54c1

Browse files
committed
chore: add tailwind and primevue
1 parent b1e0e9b commit 36f54c1

File tree

10 files changed

+1043
-465
lines changed

10 files changed

+1043
-465
lines changed

.vscode/extensions.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"recommendations": ["jripouteau.adonis-extension-pack", "vue.volar"]
2+
"recommendations": [
3+
"jripouteau.adonis-extension-pack",
4+
"vue.volar",
5+
"bradlc.vscode-tailwindcss",
6+
"csstools.postcss"
7+
]
38
}

inertia/app/app.ts

+30-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
/// <reference path="../../adonisrc.ts" />
22
/// <reference path="../../config/inertia.ts" />
33

4-
import '../css/app.css'
5-
import { createSSRApp, h } from 'vue'
6-
import type { DefineComponent } from 'vue'
7-
import { createInertiaApp } from '@inertiajs/vue3'
84
import { resolvePageComponent } from '@adonisjs/inertia/helpers'
5+
import { createInertiaApp } from '@inertiajs/vue3'
6+
import { updatePreset } from '@primevue/themes'
7+
import Aura from '@primevue/themes/aura'
8+
import PrimeVue from 'primevue/config'
9+
import type { DefineComponent } from 'vue'
10+
import { createSSRApp, h } from 'vue'
11+
import '../css/app.css'
912

1013
const appName = import.meta.env.VITE_APP_NAME || 'AdonisJS'
1114

@@ -24,6 +27,29 @@ createInertiaApp({
2427
setup({ el, App, props, plugin }) {
2528
createSSRApp({ render: () => h(App, props) })
2629
.use(plugin)
30+
.use(PrimeVue, {
31+
theme: {
32+
preset: Aura,
33+
},
34+
})
2735
.mount(el)
36+
37+
updatePreset({
38+
semantic: {
39+
primary: {
40+
50: '{cyan.50}',
41+
100: '{cyan.100}',
42+
200: '{cyan.200}',
43+
300: '{cyan.300}',
44+
400: '{cyan.400}',
45+
500: '{cyan.500}',
46+
600: '{cyan.600}',
47+
700: '{cyan.700}',
48+
800: '{cyan.800}',
49+
900: '{cyan.900}',
50+
950: '{cyan.950}',
51+
},
52+
},
53+
})
2854
},
2955
})

inertia/app/ssr.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createInertiaApp } from '@inertiajs/vue3'
22
import { renderToString } from '@vue/server-renderer'
3+
import PrimeVue from 'primevue/config'
34
import { createSSRApp, h, type DefineComponent } from 'vue'
45

56
export default function render(page: any) {
@@ -12,7 +13,9 @@ export default function render(page: any) {
1213
},
1314

1415
setup({ App, props, plugin }) {
15-
return createSSRApp({ render: () => h(App, props) }).use(plugin)
16+
return createSSRApp({ render: () => h(App, props) })
17+
.use(plugin)
18+
.use(PrimeVue)
1619
},
1720
})
1821
}

inertia/css/app.css

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
15
* {
26
margin: 0;
37
padding: 0;

inertia/pages/home.vue

+13-369
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)