feat: add routes, lang, tests, stubs, docs, and docker configurations
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import { createInertiaApp } from '@inertiajs/react'
|
||||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
|
||||
|
||||
const el = document.getElementById('app')
|
||||
|
||||
if (el && el.dataset.page) {
|
||||
createInertiaApp({
|
||||
resolve: (name) => {
|
||||
const appPages = import.meta.glob('./Pages/**/*.jsx')
|
||||
const modulePages = import.meta.glob('/Modules/*/resources/js/Pages/**/*.jsx')
|
||||
|
||||
const parts = name.split('/')
|
||||
const modulePage = `/Modules/${parts[0]}/resources/js/Pages/${parts.slice(1).join('/')}.jsx`
|
||||
|
||||
if (modulePages[modulePage]) {
|
||||
return modulePages[modulePage]()
|
||||
}
|
||||
|
||||
return resolvePageComponent(`./Pages/${name}.jsx`, appPages)
|
||||
},
|
||||
setup({ el, App, props }) {
|
||||
createRoot(el).render(<App {...props} />)
|
||||
},
|
||||
progress: {
|
||||
color: '#4B5563',
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createInertiaApp } from '@inertiajs/svelte'
|
||||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
|
||||
|
||||
const el = document.getElementById('app')
|
||||
|
||||
if (el && el.dataset.page) {
|
||||
createInertiaApp({
|
||||
resolve: (name) => {
|
||||
const appPages = import.meta.glob('./Pages/**/*.svelte')
|
||||
const modulePages = import.meta.glob('/Modules/*/resources/js/Pages/**/*.svelte')
|
||||
|
||||
const parts = name.split('/')
|
||||
const modulePage = `/Modules/${parts[0]}/resources/js/Pages/${parts.slice(1).join('/')}.svelte`
|
||||
|
||||
if (modulePages[modulePage]) {
|
||||
return modulePages[modulePage]()
|
||||
}
|
||||
|
||||
return resolvePageComponent(`./Pages/${name}.svelte`, appPages)
|
||||
},
|
||||
setup({ el, App, props }) {
|
||||
new App({ target: el, props })
|
||||
},
|
||||
progress: {
|
||||
color: '#4B5563',
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { createApp, h } from 'vue'
|
||||
import { createInertiaApp } from '@inertiajs/vue3'
|
||||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
|
||||
|
||||
const el = document.getElementById('app')
|
||||
|
||||
if (el && el.dataset.page) {
|
||||
createInertiaApp({
|
||||
resolve: (name) => {
|
||||
const appPages = import.meta.glob('./Pages/**/*.vue')
|
||||
const modulePages = import.meta.glob('/Modules/*/resources/js/Pages/**/*.vue')
|
||||
|
||||
const parts = name.split('/')
|
||||
const modulePage = `/Modules/${parts[0]}/resources/js/Pages/${parts.slice(1).join('/')}.vue`
|
||||
|
||||
if (modulePages[modulePage]) {
|
||||
return modulePages[modulePage]()
|
||||
}
|
||||
|
||||
return resolvePageComponent(`./Pages/${name}.vue`, appPages)
|
||||
},
|
||||
setup({ el, App, props, plugin }) {
|
||||
createApp({ render: () => h(App, props) })
|
||||
.use(plugin)
|
||||
.mount(el)
|
||||
},
|
||||
progress: {
|
||||
color: '#4B5563',
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function $COMPONENT_NAME$({ }) {
|
||||
return (
|
||||
<div>
|
||||
{/* $COMPONENT_NAME$ component */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
// Add your props here
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<!-- $COMPONENT_NAME$ component -->
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
// Add your props here
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- $COMPONENT_NAME$ component -->
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Head } from '@inertiajs/react'
|
||||
|
||||
export default function $PAGE_NAME$({ }) {
|
||||
return (
|
||||
<>
|
||||
<Head title="$STUDLY_NAME$ - $PAGE_NAME$" />
|
||||
|
||||
<div className="py-12">
|
||||
<div className="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div className="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div className="p-6">
|
||||
<h1 className="text-2xl font-bold">$PAGE_NAME$</h1>
|
||||
<p className="mt-4">$STUDLY_NAME$ module - $PAGE_NAME$ page</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<script>
|
||||
import { page } from '@inertiajs/svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>$STUDLY_NAME$ - $PAGE_NAME$</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="p-6">
|
||||
<h1 class="text-2xl font-bold">$PAGE_NAME$</h1>
|
||||
<p class="mt-4">$STUDLY_NAME$ module - $PAGE_NAME$ page</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup>
|
||||
import { Head } from '@inertiajs/vue3'
|
||||
|
||||
defineProps({
|
||||
// Add your props here
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<Head title="$STUDLY_NAME$ - $PAGE_NAME$" />
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="p-6">
|
||||
<h1 class="text-2xl font-bold">$PAGE_NAME$</h1>
|
||||
<p class="mt-4">$STUDLY_NAME$ module - $PAGE_NAME$ page</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user