Skip to content

Commit 6585088

Browse files
committed
feat: builder nuxt, astro tailwind
1 parent 3b4c65f commit 6585088

24 files changed

+230
-2
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'astro/config'
2+
import vue from '@astrojs/vue'
3+
import tailwind from '@astrojs/tailwind';
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
integrations: [
8+
vue({ appEntrypoint: '/src/pages/_app' }),
9+
tailwind(),
10+
],
11+
})
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: 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { App } from 'vue';
2+
import Vueform from '@vueform/vueform'
3+
4+
export default async (app: App) => {
5+
const vueformConfig = (await import('../../vueform.config')).default
6+
const builderConfig = (await import('../../builder.config')).default
7+
const Builder = (await import('@vueform/builder')).default
8+
app.use(Vueform, vueformConfig)
9+
app.use(Builder, builderConfig)
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
import Layout from '../layouts/Layout.astro';
3+
import FormBuilder from '../components/FormBuilder.vue';
4+
---
5+
6+
<Layout title="Welcome to Astro.">
7+
<FormBuilder client:only="vue"/>
8+
</Layout>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
'./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}',
8+
'./vueform.config.js',
9+
'./node_modules/@vueform/vueform/themes/tailwind/**/*.vue',
10+
'./node_modules/@vueform/vueform/themes/tailwind/**/*.js',
11+
'./node_modules/@vueform/builder/**/*.js',
12+
'./node_modules/@vueform/builder/**/*.css',
13+
],
14+
darkMode: 'class',
15+
theme: {
16+
extend: {},
17+
},
18+
plugins: [
19+
vueformPlugin,
20+
builderPlugin,
21+
],
22+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import en from '@vueform/vueform/locales/en'
2+
import theme 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,
8+
locales: { en },
9+
locale: 'en',
10+
apiKey: 'YOUR_PUBLIC_KEY',
11+
plugins: [
12+
builder,
13+
],
14+
})
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'astro/config'
2+
import vue from '@astrojs/vue'
3+
import tailwind from '@astrojs/tailwind';
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
integrations: [
8+
vue({ appEntrypoint: '/src/pages/_app' }),
9+
tailwind(),
10+
],
11+
})
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: 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>

0 commit comments

Comments
 (0)