Merge branch 'client-bundle-size-reduction' into experimental-hbs-caching

This commit is contained in:
Andrew Kingston 2022-01-31 18:58:19 +00:00
commit a3135bd98f
10 changed files with 1118 additions and 398 deletions

View File

@ -3,8 +3,7 @@
import "@spectrum-css/table/dist/index-vars.css"
import CellRenderer from "./CellRenderer.svelte"
import SelectEditRenderer from "./SelectEditRenderer.svelte"
import { cloneDeep } from "lodash"
import { deepGet } from "../helpers"
import { cloneDeep, deepGet } from "../helpers"
/**
* The expected schema is our normal couch schemas for our tables.

View File

@ -98,3 +98,11 @@ export const deepSet = (obj, key, value) => {
}
obj[split[split.length - 1]] = value
}
/**
* Deeply clones an object. Functions are not supported.
* @param obj the object to clone
*/
export const cloneDeep = obj => {
return JSON.parse(JSON.stringify(obj))
}

View File

@ -2,4 +2,5 @@
node_modules
package-lock.json
release/
dist/
dist/
stats.html

View File

@ -22,15 +22,6 @@
"@budibase/bbui": "^1.0.46-alpha.8",
"@budibase/frontend-core": "^1.0.46-alpha.8",
"@budibase/string-templates": "^1.0.46-alpha.8",
"regexparam": "^1.3.0",
"rollup-plugin-polyfill-node": "^0.8.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"
},
"devDependencies": {
"@rollup/plugin-alias": "^3.1.5",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",
@ -41,18 +32,25 @@
"@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1",
"dayjs": "^1.10.5",
"fs-extra": "^8.1.0",
"jsdom": "^16.0.1",
"postcss": "^8.2.10",
"regexparam": "^1.3.0",
"rollup-plugin-polyfill-node": "^0.8.0",
"shortid": "^2.2.15",
"svelte": "^3.38.2",
"svelte-apexcharts": "^1.0.2",
"svelte-flatpickr": "^3.1.0",
"svelte-spa-router": "^3.0.5"
},
"devDependencies": {
"@rollup/plugin-alias": "^3.1.5",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"rollup": "^2.44.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-svg": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"svelte": "^3.38.2",
"svelte-apexcharts": "^1.0.2",
"svelte-flatpickr": "^3.1.0"
"rollup-plugin-visualizer": "^5.5.4"
},
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
}

View File

@ -8,6 +8,7 @@ import svg from "rollup-plugin-svg"
import json from "rollup-plugin-json"
import nodePolyfills from "rollup-plugin-polyfill-node"
import path from "path"
import { visualizer } from "rollup-plugin-visualizer"
const production = !process.env.ROLLUP_WATCH
const ignoredWarnings = [
@ -79,6 +80,7 @@ export default {
svg(),
json(),
production && terser(),
visualizer(),
],
watch: {
clearScreen: false,

View File

@ -2,8 +2,7 @@
import { setContext, getContext } from "svelte"
import { derived, get, writable } from "svelte/store"
import { createValidatorFromConstraints } from "./validation"
import { Helpers } from "@budibase/bbui"
import { cloneDeep } from "lodash/fp"
import { Helpers, cloneDeep } from "@budibase/bbui"
export let dataSource
export let disabled = false

View File

@ -1,4 +1,4 @@
import { cloneDeep } from "lodash/fp"
import { cloneDeep } from "@budibase/bbui"
import { processString, processObjectSync } from "@budibase/string-templates"
// Regex to test inputs with to see if they are likely candidates for template strings

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
import DataFetch from "./DataFetch.js"
import { cloneDeep } from "lodash/fp"
import { cloneDeep } from "@budibase/bbui"
import { get } from "svelte/store"
export default class QueryFetch extends DataFetch {

View File

@ -1,2 +1,3 @@
dist/
node_modules/
stats.html