Remove old test dir and add yarn lockfile

This commit is contained in:
Andrew Kingston 2020-12-01 10:47:48 +00:00
parent fd65e5e8a0
commit e4db97aa21
8 changed files with 2228 additions and 143 deletions

View File

@ -1,5 +1,4 @@
.DS_Store .DS_Store
node_modules node_modules
yarn.lock
package-lock.json package-lock.json
dist/ dist/

View File

@ -1,6 +1,5 @@
import commonjs from "@rollup/plugin-commonjs" import commonjs from "@rollup/plugin-commonjs"
import resolve from "@rollup/plugin-node-resolve" import resolve from "@rollup/plugin-node-resolve"
// import replace from "@rollup/plugin-replace"
import svelte from "rollup-plugin-svelte" import svelte from "rollup-plugin-svelte"
import postcss from "rollup-plugin-postcss" import postcss from "rollup-plugin-postcss"
import { terser } from "rollup-plugin-terser" import { terser } from "rollup-plugin-terser"
@ -29,10 +28,5 @@ export default {
skip: externals, skip: externals,
}), }),
commonjs(), commonjs(),
// Fix for https://github.com/sveltejs/svelte/issues/3165
// replace({
// "outros.c.push":
// "if (outros === undefined) { block.o(local); return }\noutros.c.push",
// }),
], ],
} }

View File

@ -1,47 +0,0 @@
<script>
import createApp from "./createApp"
import { form } from "./props"
let _bb
let currentComponent
let _appPromise
const autoAssignIds = (props, count = 0) => {
if (!props._id) {
props._id = `auto_id_${count}`
}
if (props._children) {
for (let child of props._children) {
count += 1
autoAssignIds(child, count)
}
}
}
$: {
if (currentComponent) {
const _appPromise = createApp()
const page = {
props: form,
}
autoAssignIds(page.props)
_appPromise.then(initialise => {
initialise(page, currentComponent, "")
})
}
}
</script>
{#await _appPromise}
loading
{:then _}
<div id="current_component" bind:this={currentComponent} />
{/await}
<style>
#current_component {
height: 100%;
width: 100%;
}
</style>

View File

@ -1,64 +0,0 @@
export const form = {
_id: "1",
_component: "@budibase/standard-components/container",
type: "main",
_children: [
{
_component: "@budibase/standard-components/heading",
type: "h1",
_children: [
{
_component: "@budibase/standard-components/text",
text: "This is an H1 Heading",
},
],
},
{
_component: "@budibase/standard-components/text",
text: "This just some text",
type: "strong",
},
{
_component: "@budibase/standard-components/container",
type: "paragraph",
backgroundColor: "red",
color: "white",
borderStyle: "solid",
borderWidth: "3px",
borderColor: "blue",
_children: [
{
_component: "@budibase/standard-components/text",
formattingTag: "<i>",
text: "some iatlics in a paragraph",
},
],
},
{
_component: "@budibase/standard-components/heading",
type: "h2",
_children: [
{
_component: "@budibase/standard-components/text",
text: "This is an H2 Heading",
},
],
},
{
_component: "@budibase/standard-components/select",
value: "two",
_children: [
{
_component: "@budibase/standard-components/option",
text: "number 1",
value: "one",
},
{
_component: "@budibase/standard-components/option",
text: "number 2",
value: "two",
},
],
},
],
}

View File

@ -1,15 +0,0 @@
export const rootComponent = window => {
return function(opts) {
const node = window.document.createElement("DIV")
const $set = props => {
props._bb.attachChildren(node)
}
const $destroy = () => {
if (opts.target && node) opts.target.removeChild(node)
}
this.$set = $set
this.$set(opts.props)
this.$destroy = $destroy
opts.target.appendChild(node)
}
}

View File

@ -1,3 +0,0 @@
import * as components from "../index"
export default components

View File

@ -1,7 +0,0 @@
import App from "./TestApp.svelte"
const app = new App({
target: document.body,
})
export default app

File diff suppressed because it is too large Load Diff