Skip to content

Commit

Permalink
fix: demo assets
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Oct 30, 2024
1 parent 0e7ccee commit 2dd2cb2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
15 changes: 3 additions & 12 deletions src/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
<body>
<div class="site-wrap">
<header id="demo-header">
<div id="debug-wrap">
<div class="debug-window inner">
<div class="option-editor debug-type"><!-- <h2>Language</h2> --></div>
<!--
<div class="action-tester debug-type">
<h2>Action Tester</h2>
</div>
-->
</div>
</div>
<nav aria-label="Footer navigation">
<ul>
<li>
Expand All @@ -35,7 +25,6 @@ <h2>Action Tester</h2>
</select>
<label for="control-filter">Control Filter:</label>
<input type="text" id="control-filter" placeholder="ex. text" class="form-control" />
<!-- <a href="#debug" id="debug-demo" title="Debug">Debug</a> -->
</li>
<li style="float: right;">
v<%= version %>
Expand All @@ -46,7 +35,9 @@ <h2>Action Tester</h2>
</header>
<section id="main_content" class="inner">
<form class="build-form clearfix"></form>
<div class="render-form"><h2>Rendered Form</h2></div>
<div class="render-form">
<h2>Rendered Form</h2>
</div>
</section>
<div class="container render-btn-wrap" id="editor-action-buttons">
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/demo/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { editorOptions, renderOptions } from './options/index.js'
import { editorButtons } from './actionButtons.js'
import { editorEvents } from './events.js'

import { FormeoEditor, FormeoRenderer } from 'formeo'
import { FormeoEditor, FormeoRenderer } from '../../lib/js/index.js'

const editor = new FormeoEditor(editorOptions)
const renderer = new FormeoRenderer(renderOptions)
Expand Down
9 changes: 6 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ export default defineConfig({
demo: resolve(__dirname, 'src/demo/index.html'),
},
output: {
manualChunks: {
formeo: ['formeo'],
},
entryFileNames: 'assets/js/[name].min.js',
chunkFileNames: 'assets/js/[name].min.js',
assetFileNames: assetInfo => {
Expand All @@ -71,6 +68,7 @@ export default defineConfig({
return `assets/${getExtType(assetInfo)}/[name].${ext}`
},
},
external: ['formeo'],
},
outDir: resolve(__dirname, 'dist/demo'),
minify: 'terser',
Expand Down Expand Up @@ -115,6 +113,11 @@ export default defineConfig({
src: resolve('node_modules', '@draggable/formeo-languages/dist/lang/*'),
dest: './assets/lang',
},
{
src: resolve('dist/formeo.umd.js'),
dest: './assets/js/',
rename: 'formeo.min.js',
},
],
}),
],
Expand Down

0 comments on commit 2dd2cb2

Please sign in to comment.