Skip to content

Conversation

arackaf
Copy link
Collaborator

@arackaf arackaf commented Mar 11, 2023

This PR updates your pre-publish script to use svelte-package, as documented here, which generates TypeScript types. I've updated your package.json to use "exports" and added the needed "typesVersions" magic as described here

With this change, you can import the Dropzone component like this

import Dropzone from "svelte-file-dropzone/Dropzone.svelte";

which plays well with TypeScript. Also, I believe this library previously used Rollup to compile the Svelte away, which I'm pretty sure is heavily discouraged, ie in case your end user is using a different version of svelte than that which you used to compile it.

If you'd like to test what this looks like, it's deployed to this library.

https://www.npmjs.com/package/arackaf-svelte-file-dropzone

I left your rollup build script in place since I think it might be needed for your Storybook? In any event, SvelteKit might be a simpler way to demo the project (see the library template it generates for more info).

Lastly, my previous PR is incorporated into this one

#126

@arackaf
Copy link
Collaborator Author

arackaf commented Mar 11, 2023

Also just fyi if you've moved on from this project I'd be happy to keep working on it as a collaborator: get rid of the old build stuff, move storybook to SvelteKit, look at old PRs, etc

@thecodejack
Copy link
Owner

Hi @arackaf Thanks for PR. I will add you as maintainer over weekend. Thanks :)

@thecodejack thecodejack merged commit a0a0a55 into thecodejack:master Mar 17, 2023
@thecodejack
Copy link
Owner

Hi @arackaf

I have invited you to maintain package in both github & npm. Please help in the maintenance. Thanks.

@arackaf
Copy link
Collaborator Author

arackaf commented Mar 17, 2023

Awesome!!!

@arackaf
Copy link
Collaborator Author

arackaf commented Mar 17, 2023

I see the GitHub invite, but not npm. Did you send it to arackaf ?

@thecodejack
Copy link
Owner

yes.

image

@arackaf
Copy link
Collaborator Author

arackaf commented Mar 17, 2023

got it sorry about that - npm is bad about showing pending invites - got it from email though

@arackaf
Copy link
Collaborator Author

arackaf commented Mar 21, 2023

@thecodejack I got the PR released. I couldn't keep the prior top-level default import working, so I pushed out a 2.0 release, with release notes that the only breaking change is the import to use to get the dropzone component.

I'm gonna work on getting a storybook upgrade PR up soon ...

@thecodejack
Copy link
Owner

Thanks @arackaf . I will try to be proactive from mid of April if need any help on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants