-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b13e41
commit 8af6c36
Showing
14 changed files
with
351 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/app.tsx') }) | ||
}}} | ||
import './css/app.css'; | ||
|
||
import { createRoot } from 'react-dom/client'; | ||
import { createInertiaApp } from '@inertiajs/react'; | ||
|
||
const appName = import.meta.env.VITE_APP_NAME || 'AdonisJS' | ||
|
||
createInertiaApp({ | ||
progress: { color: '#5468FF' }, | ||
|
||
title: (title) => {{ '`${title} - ${appName}`' }}, | ||
|
||
resolve: (name) => { | ||
const pages = import.meta.glob('./pages/**/*.vue', { eager: true }) | ||
{{ 'return pages[`./pages/${name}.vue`]' }} | ||
}, | ||
|
||
setup({ el, App, props }) { | ||
const root = createRoot(el); | ||
root.render(<App {...props} />); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/views/root.edge') }) | ||
}}} | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title inertia>AdonisJS x Inertia x React</title> | ||
|
||
@viteReactRefresh() | ||
@vite(['resources/app.tsx']) | ||
@inertiaHead() | ||
</head> | ||
|
||
<body> | ||
@inertia() | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/tsconfig.json') }) | ||
}}} | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"jsx": "react-jsx", | ||
"lib": ["DOM", "ESNext", "DOM.Iterable", "ES2020"], | ||
"useDefineForClassFields": true, | ||
"baseUrl": ".", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"paths": { | ||
"@/*": ["./*"], | ||
"~/*": ["../*"], | ||
}, | ||
"resolveJsonModule": true, | ||
"types": ["vite/client"], | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"verbatimModuleSyntax": true, | ||
"skipLibCheck": true, | ||
}, | ||
"include": ["./**/*.ts", "./**/*.tsx", "app.tsx.stub"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/app.tsx') }) | ||
}}} | ||
import './css/app.css' | ||
|
||
import { render } from 'solid-js/web' | ||
import { createInertiaApp } from 'inertia-adapter-solid' | ||
|
||
const appName = import.meta.env.VITE_APP_NAME || 'AdonisJS' | ||
|
||
createInertiaApp({ | ||
progress: { color: '#5468FF' }, | ||
|
||
title: (title) => {{ '`${title} - ${appName}`' }}, | ||
|
||
resolve(name) { | ||
const pages = import.meta.glob('./pages/**/*.tsx', { eager: true }) | ||
{{ 'return pages[`./pages/${name}.tsx`]' }} | ||
}, | ||
|
||
setup({ el, App, props }) { | ||
render(() => <App {...props} />, el) | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/views/root.edge') }) | ||
}}} | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title inertia>AdonisJS x Inertia x SolidJS</title> | ||
|
||
@vite(['resources/app.tsx']) | ||
@inertiaHead() | ||
</head> | ||
|
||
<body> | ||
@inertia() | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/tsconfig.json') }) | ||
}}} | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"jsx": "preserve", | ||
"jsxImportSource": "solid-js", | ||
"lib": ["DOM", "ESNext", "DOM.Iterable", "ES2020"], | ||
"useDefineForClassFields": true, | ||
"baseUrl": ".", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"paths": { | ||
"@/*": ["./*"], | ||
"~/*": ["../*"], | ||
}, | ||
"resolveJsonModule": true, | ||
"types": ["vite/client"], | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"verbatimModuleSyntax": true, | ||
"skipLibCheck": true, | ||
}, | ||
"include": ["./**/*.ts", "./**/*.tsx", "app.tsx.stub"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/app.ts') }) | ||
}}} | ||
import './css/app.css'; | ||
|
||
import { createApp, h } from 'vue' | ||
import type { DefineComponent } from 'vue' | ||
import { createInertiaApp } from '@inertiajs/vue3' | ||
|
||
const appName = import.meta.env.VITE_APP_NAME || 'AdonisJS' | ||
|
||
createInertiaApp({ | ||
progress: { color: '#5468FF' }, | ||
|
||
title: (title) => {{ '`${title} - ${appName}`' }}, | ||
|
||
resolve: (name) => { | ||
const pages = import.meta.glob<DefineComponent>('./pages/**/*.vue', { eager: true }) | ||
{{ 'return pages[`./pages/${name}.vue`]' }} | ||
}, | ||
|
||
setup({ el, App, props, plugin }) { | ||
createApp({ render: () => h(App, props) }) | ||
.use(plugin) | ||
.mount(el) | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/views/root.edge') }) | ||
}}} | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title inertia>AdonisJS x Inertia x VueJS</title> | ||
|
||
@vite(['resources/app.ts']) | ||
@inertiaHead() | ||
</head> | ||
|
||
<body> | ||
@inertia() | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{{ | ||
exports({ to: app.makePath('resources/tsconfig.json') }) | ||
}}} | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"jsx": "preserve", | ||
"jsxImportSource": "vue", | ||
"lib": ["DOM", "ESNext", "DOM.Iterable", "ES2020"], | ||
"useDefineForClassFields": true, | ||
"baseUrl": ".", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"paths": { | ||
"@/*": ["./*"], | ||
"~/*": ["../*"], | ||
}, | ||
"resolveJsonModule": true, | ||
"types": ["vite/client"], | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"verbatimModuleSyntax": true, | ||
"skipLibCheck": true, | ||
}, | ||
"include": ["./**/*.ts", "./**/*.vue"], | ||
} |
Oops, something went wrong.