ubeac / svelte

Accelerate your Svelte development with uBeac's powerful and easy-to-use UI components
https://svelte.ubeac.io
MIT License
37 stars 6 forks source link

Working repl #878

Closed TheHadiAhmadi closed 1 year ago

TheHadiAhmadi commented 1 year ago

Why I added 'index.js' at end of imports?

because unpkg.com cdn doesn't support directory imports. image

when some imports requested a directory, unpkg.com redirects to /browse/... page which is an HTML page

https://svelte.dev/repl/9a5f84f401224f59b614b16c958659bd?version=3.55.1

TheHadiAhmadi commented 1 year ago

why didn't imported from $lib/components?

I don't have an example for it right now, but happened while working on this task. when imported from '$lib/components' then some import urls was: 'unpkg.com/ubeac-svelte/Card/Card.svelte'

which is not valid and should be something like: 'unpkg.com/ubeac-svelte/components/Card/Card.svelte'

I am not 100% sure about this and we can test it again.

TheHadiAhmadi commented 1 year ago

@iconify/svelte is not working on repl

https://svelte.dev/repl/9cfc98097e5c4d50a25e851121ce3206?version=3.55.1

error message:

enableCache is not exported by https://unpkg.com/@iconify/svelte@3.0.1/dist/functions.js, imported by https://unpkg.com/@iconify/svelte@3.0.1/dist/Icon.svelte

TheHadiAhmadi commented 1 year ago

Also I removed index.d.ts file which is not needed and 'svelte-package' command will generate this file based on index.ts file

TheHadiAhmadi commented 1 year ago

@pournasserian please review #882. we can update imports or find other solutions to support REPL later.

TheHadiAhmadi commented 1 year ago

image Carbon components import other components directly from '.svelte' file

we can test this

TheHadiAhmadi commented 1 year ago

Another Example: image https://github.com/carbon-design-system/carbon-components-svelte/blob/afa692c9e0db235d0e54975281fa89f831109077/src/Pagination/Pagination.svelte#L78

pournasserian commented 1 year ago

@TheHadiAhmadi is this PR valid?