From 93c93a3330fda096351002d520e16951f784d9d5 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Fri, 14 May 2021 21:39:12 +0300 Subject: [PATCH] Rebuild Svelte component: component is now a default export, svelte component is used as main export to make it work correctly with SSR --- .../sapper-demo/src/components/Nav.svelte | 2 +- .../sapper-demo/src/routes/blog/index.svelte | 4 +- packages/sapper-demo/src/routes/index.svelte | 6 +- .../src/demo-components/Checkbox.svelte | 2 +- .../src/demo-components/Inline.svelte | 4 +- .../src/demo-components/UsageFull.svelte | 2 +- .../demo-components/UsageFullOffline.svelte | 2 +- .../src/demo-components/UsageOffline.svelte | 2 +- .../svelte-demo/src/samples/Alignment.svelte | 2 +- .../svelte-demo/src/samples/ColorStyle.svelte | 2 +- .../svelte-demo/src/samples/Inline.svelte | 2 +- .../svelte-demo/src/samples/Sample.svelte | 2 +- packages/svelte-demo/src/samples/Style.svelte | 2 +- .../src/samples/Transformations.svelte | 4 +- packages/svelte/api-extractor.functions.json | 9 ++ packages/svelte/api-extractor.iconify.json | 38 +---- ...ractor.offline.json => api-extractor.json} | 5 - .../api-extractor.offline-functions.json | 9 ++ .../svelte/api-extractor.offline-iconify.json | 9 ++ packages/svelte/build.js | 131 ++++++++++++++++-- packages/svelte/copy.js | 45 ------ packages/svelte/package.json | 10 +- packages/svelte/rollup.config.js | 13 +- packages/svelte/src/Icon.svelte | 37 +++++ packages/svelte/src/OfflineIcon.svelte | 15 ++ packages/svelte/src/OfflineIcon.svelte.d.ts | 3 - packages/svelte/src/iconify.ts | 4 +- .../src/{offline.ts => offline-iconify.ts} | 4 +- .../src/{Icon.svelte.d.ts => svelte.d.ts} | 3 + packages/svelte/tests/api/10-api-mock.test.js | 2 +- .../tests/api/20-rendering-from-api.test.js | 2 +- .../tests/api/30-changing-props.test.js | 2 +- .../tests/api/fixtures/ChangeIcon.svelte | 2 +- .../tests/api/fixtures/ChangeProps.svelte | 2 +- packages/svelte/tests/api/load.js | 2 +- .../svelte/tests/iconify/10-basic.test.js | 5 +- .../svelte/tests/iconify/10-empty.test.js | 2 +- .../tests/iconify/20-attributes.test.js | 5 +- .../tests/iconify/20-dimensions.test.js | 5 +- packages/svelte/tests/iconify/20-ids.test.js | 5 +- .../svelte/tests/iconify/20-inline.test.js | 2 +- .../tests/iconify/20-transformations.test.js | 2 +- .../svelte/tests/offline/10-basic.test.js | 5 +- .../svelte/tests/offline/10-empty.test.js | 2 +- .../tests/offline/20-attributes.test.js | 5 +- .../tests/offline/20-dimensions.test.js | 5 +- packages/svelte/tests/offline/20-ids.test.js | 5 +- .../svelte/tests/offline/20-inline.test.js | 2 +- .../svelte/tests/offline/20-storage.test.js | 17 +-- .../tests/offline/20-transformations.test.js | 2 +- 50 files changed, 273 insertions(+), 181 deletions(-) create mode 100644 packages/svelte/api-extractor.functions.json rename packages/svelte/{api-extractor.offline.json => api-extractor.json} (82%) create mode 100644 packages/svelte/api-extractor.offline-functions.json create mode 100644 packages/svelte/api-extractor.offline-iconify.json delete mode 100644 packages/svelte/copy.js delete mode 100644 packages/svelte/src/OfflineIcon.svelte.d.ts rename packages/svelte/src/{offline.ts => offline-iconify.ts} (77%) rename packages/svelte/src/{Icon.svelte.d.ts => svelte.d.ts} (77%) diff --git a/packages/sapper-demo/src/components/Nav.svelte b/packages/sapper-demo/src/components/Nav.svelte index 8e442c5..348293a 100644 --- a/packages/sapper-demo/src/components/Nav.svelte +++ b/packages/sapper-demo/src/components/Nav.svelte @@ -1,5 +1,5 @@
diff --git a/packages/svelte-demo/src/demo-components/UsageFull.svelte b/packages/svelte-demo/src/demo-components/UsageFull.svelte index 3a36094..d937a45 100644 --- a/packages/svelte-demo/src/demo-components/UsageFull.svelte +++ b/packages/svelte-demo/src/demo-components/UsageFull.svelte @@ -1,5 +1,5 @@
diff --git a/packages/svelte-demo/src/demo-components/UsageFullOffline.svelte b/packages/svelte-demo/src/demo-components/UsageFullOffline.svelte index 6a98cf3..a31c473 100644 --- a/packages/svelte-demo/src/demo-components/UsageFullOffline.svelte +++ b/packages/svelte-demo/src/demo-components/UsageFullOffline.svelte @@ -1,5 +1,5 @@ diff --git a/packages/svelte-demo/src/demo-components/UsageOffline.svelte b/packages/svelte-demo/src/demo-components/UsageOffline.svelte index d3875df..444cf3e 100644 --- a/packages/svelte-demo/src/demo-components/UsageOffline.svelte +++ b/packages/svelte-demo/src/demo-components/UsageOffline.svelte @@ -1,5 +1,5 @@ diff --git a/packages/svelte-demo/src/samples/Alignment.svelte b/packages/svelte-demo/src/samples/Alignment.svelte index ca20e48..ace4fff 100644 --- a/packages/svelte-demo/src/samples/Alignment.svelte +++ b/packages/svelte-demo/src/samples/Alignment.svelte @@ -1,5 +1,5 @@ diff --git a/packages/svelte-demo/src/samples/ColorStyle.svelte b/packages/svelte-demo/src/samples/ColorStyle.svelte index bc7d0f1..f4c6fff 100644 --- a/packages/svelte-demo/src/samples/ColorStyle.svelte +++ b/packages/svelte-demo/src/samples/ColorStyle.svelte @@ -1,5 +1,5 @@ diff --git a/packages/svelte-demo/src/samples/Style.svelte b/packages/svelte-demo/src/samples/Style.svelte index 45dc9e0..d4b4f20 100644 --- a/packages/svelte-demo/src/samples/Style.svelte +++ b/packages/svelte-demo/src/samples/Style.svelte @@ -1,5 +1,5 @@