Skip to content

Commit 408dd5a

Browse files
committed
feat: builder laravel
1 parent 2d9ab45 commit 408dd5a

File tree

9 files changed

+115
-0
lines changed

9 files changed

+115
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vueform/builder'
2+
3+
import '@vueform/builder/index.css';
4+
5+
export default defineConfig({})
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import './bootstrap'
2+
3+
import { createApp } from 'vue'
4+
import App from './components/App.vue'
5+
import Vueform from '@vueform/vueform'
6+
import vueformConfig from './../../vueform.config'
7+
import Builder from '@vueform/builder'
8+
import builderConfig from './../../builder.config'
9+
10+
const app = createApp(App)
11+
app.use(Vueform, vueformConfig)
12+
app.use(Builder, builderConfig)
13+
app.mount('#app')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div class="h-screen">
3+
<VueformBuilder />
4+
</div>
5+
</template>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Laravel</title>
7+
@vite(['resources/css/app.css', 'resources/js/app.js'])
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
</body>
12+
</html>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import vueformPlugin from '@vueform/vueform/tailwind'
2+
import builderPlugin from '@vueform/builder/tailwind'
3+
4+
/** @type {import('tailwindcss').Config} */
5+
export default {
6+
content: [
7+
"./resources/**/*.blade.php",
8+
"./resources/**/*.js",
9+
"./resources/**/*.vue",
10+
'./node_modules/@vueform/vueform/themes/tailwind/**/*.vue',
11+
'./node_modules/@vueform/vueform/themes/tailwind/**/*.js',
12+
'./node_modules/@vueform/builder/**/*.js',
13+
'./node_modules/@vueform/builder/**/*.css',
14+
],
15+
darkMode: 'class',
16+
theme: {
17+
extend: {},
18+
},
19+
plugins: [
20+
vueformPlugin,
21+
builderPlugin,
22+
]
23+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { defineConfig } from 'vite';
2+
import laravel from 'laravel-vite-plugin';
3+
import vue from '@vitejs/plugin-vue';
4+
5+
export default defineConfig({
6+
plugins: [
7+
laravel({
8+
input: [
9+
'resources/css/app.css',
10+
'resources/js/app.js',
11+
],
12+
refresh: true,
13+
}),
14+
vue({
15+
template: {
16+
transformAssetUrls: {
17+
// The Vue plugin will re-write asset URLs, when referenced
18+
// in Single File Components, to point to the Laravel web
19+
// server. Setting this to `null` allows the Laravel plugin
20+
// to instead re-write asset URLs to point to the Vite
21+
// server instead.
22+
base: null,
23+
24+
// The Vue plugin will parse absolute URLs and treat them
25+
// as absolute paths to files on disk. Setting this to
26+
// `false` will leave absolute URLs un-touched so they can
27+
// reference assets in the public directory as expected.
28+
includeAbsolute: false,
29+
},
30+
},
31+
}),
32+
],
33+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import en from '@vueform/vueform/locales/en'
2+
import vueform from '@vueform/vueform/dist/tailwind'
3+
import { defineConfig } from '@vueform/vueform'
4+
import builder from '@vueform/builder/plugin'
5+
6+
export default defineConfig({
7+
theme: vueform,
8+
locales: { en },
9+
locale: 'en',
10+
axios: window.axios,
11+
apiKey: 'YOUR_PUBLIC_KEY',
12+
plugins: [
13+
builder,
14+
],
15+
})

0 commit comments

Comments
 (0)