From 591d1c0fc5a6c95b71df95e4bc993024309af086 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 15 Apr 2021 19:28:08 +0100 Subject: [PATCH] Change BBUI to single bundle export and clean up some form components --- packages/bbui/package.json | 4 --- packages/bbui/rollup.config.js | 13 +++----- .../{internal => Core}/Multiselect.svelte | 0 .../src/Form/{internal => Core}/Picker.svelte | 0 .../src/Form/{internal => Core}/Select.svelte | 0 .../Form/{internal => Core}/TextField.svelte | 0 packages/bbui/src/Form/Core/index.js | 3 ++ packages/bbui/src/Form/Input.svelte | 2 +- packages/bbui/src/Form/Multiselect.svelte | 2 +- packages/bbui/src/Form/Select.svelte | 2 +- packages/bbui/src/Form/internal/index.js | 3 -- packages/bbui/src/index.js | 3 ++ .../src/components/start/Steps/API.svelte | 33 ------------------- 13 files changed, 13 insertions(+), 52 deletions(-) rename packages/bbui/src/Form/{internal => Core}/Multiselect.svelte (100%) rename packages/bbui/src/Form/{internal => Core}/Picker.svelte (100%) rename packages/bbui/src/Form/{internal => Core}/Select.svelte (100%) rename packages/bbui/src/Form/{internal => Core}/TextField.svelte (100%) create mode 100644 packages/bbui/src/Form/Core/index.js delete mode 100644 packages/bbui/src/Form/internal/index.js delete mode 100644 packages/builder/src/components/start/Steps/API.svelte diff --git a/packages/bbui/package.json b/packages/bbui/package.json index bd553a1ce6..fdc7df0931 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -9,14 +9,10 @@ ".": { "import": "./dist/bbui.es.js" }, - "./internal": { - "import": "./dist/internal.es.js" - }, "./package.json": "./package.json", "./dist/style.css": "./dist/style.css" }, "scripts": { - "dev:builder": "rollup -cw", "build": "rollup -c" }, "devDependencies": { diff --git a/packages/bbui/rollup.config.js b/packages/bbui/rollup.config.js index 617df856b4..e285d548d6 100644 --- a/packages/bbui/rollup.config.js +++ b/packages/bbui/rollup.config.js @@ -5,12 +5,12 @@ import json from "@rollup/plugin-json" import { terser } from "rollup-plugin-terser" import postcss from "rollup-plugin-postcss" -const makeConfig = ({ input, name }) => ({ - input, +export default { + input: "src/index.js", output: { sourcemap: true, format: "esm", - file: `dist/${name}.es.js`, + file: "dist/bbui.es.js", }, plugins: [ resolve(), @@ -22,9 +22,4 @@ const makeConfig = ({ input, name }) => ({ terser(), json(), ], -}) - -export default [ - makeConfig({ input: "src/index.js", name: "bbui" }), - makeConfig({ input: "src/Form/internal/index.js", name: "internal" }), -] +} diff --git a/packages/bbui/src/Form/internal/Multiselect.svelte b/packages/bbui/src/Form/Core/Multiselect.svelte similarity index 100% rename from packages/bbui/src/Form/internal/Multiselect.svelte rename to packages/bbui/src/Form/Core/Multiselect.svelte diff --git a/packages/bbui/src/Form/internal/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte similarity index 100% rename from packages/bbui/src/Form/internal/Picker.svelte rename to packages/bbui/src/Form/Core/Picker.svelte diff --git a/packages/bbui/src/Form/internal/Select.svelte b/packages/bbui/src/Form/Core/Select.svelte similarity index 100% rename from packages/bbui/src/Form/internal/Select.svelte rename to packages/bbui/src/Form/Core/Select.svelte diff --git a/packages/bbui/src/Form/internal/TextField.svelte b/packages/bbui/src/Form/Core/TextField.svelte similarity index 100% rename from packages/bbui/src/Form/internal/TextField.svelte rename to packages/bbui/src/Form/Core/TextField.svelte diff --git a/packages/bbui/src/Form/Core/index.js b/packages/bbui/src/Form/Core/index.js new file mode 100644 index 0000000000..1570f4e298 --- /dev/null +++ b/packages/bbui/src/Form/Core/index.js @@ -0,0 +1,3 @@ +export { default as CoreTextField } from "./TextField.svelte" +export { default as CoreSelect } from "./Select.svelte" +export { default as CoreMultiselect } from "./Multiselect.svelte" diff --git a/packages/bbui/src/Form/Input.svelte b/packages/bbui/src/Form/Input.svelte index db3774ce0a..3e81b09755 100644 --- a/packages/bbui/src/Form/Input.svelte +++ b/packages/bbui/src/Form/Input.svelte @@ -1,6 +1,6 @@ - -

Set up your API Key

-
- (blurred.api = true)} - label="API Key" - name="apiKey" - placeholder="Use command-V to paste your API Key" - type="password" - error={blurred.api && validationErrors.apiKey} /> - Get API Key -
- -