shellscape / doiuse-email

Lint HTML and CSS for email support against the `Can I email?` database.
MIT License
14 stars 5 forks source link

Some Thoughts #2

Closed shellscape closed 1 week ago

shellscape commented 1 year ago

(This is a seriously awesome package)

I opened a fork here: https://github.com/shellscape/doiuse-email. The biggest change there is that I swapped out the build system with tsup and changed up the tsconfig because I wasn't using your build and the tsconfig that came with it (there wasn't anything wrong with it, but) because I needed CJS compat in the package. tsup takes care of that nicely.

I always wanted to show off what I was doing with it on https://github.com/shellscape/jsx-email:

Group 20 Group 21

What do you think it would take to output an object for errors, warnings, and notes that more closely represented that visual structure; where for a single document, there was only one error (etc) message which pointed to an array of unique clients that are affected? I'm doing some reduce and Set shenanigans to make that happen as a consumer, but it would be cool for first class support.

Also saw your comment that you're not really using this anymore, so no worries if you don't want to put the time into it for the above - not at all expecting you to - but some direction on where to implement that would be cool if you're not into working on this again. I haven't looked at the source in depth yet, so pointers would be super helpful.

Thanks again!

leonsilicon commented 1 year ago

haha it's been a while since i wrote this code, but it seems like you'd probably have to modify the methods in the DoIUseEmail class https://github.com/leondreamed/doiuse-email/blob/main/src/utils/doiuse.ts) to accept a specific email client as a parameter (right now they all either loop over this.emailClients or append to the errors/warnings array indiscriminately).

jsx-email looks super cool! i remember i created this package back when i was trying to write emails using code (i used something called maizzle) but writing emails in raw email-XML was just too painful so i ended up using SaaS email builders instead πŸ˜…)

i probably won't have time to do any major refactors or add new features to this package, so i'd be happy to transfer the repo and/or package name to you if you want :)

(also apologies in advance if the source code is messy!)

shellscape commented 1 year ago

that would be amazing. thanks for being open to that, totally down for taking the reigns.

leonsilicon commented 1 year ago

i've invited you to the npm package as a collaborator, but i think GitHub needs you to rename your existing fork for a repo transfer:

image

and honestly it's an honor to have one of my packages adopted by a legend in the open-source community πŸ˜‰

shellscape commented 1 year ago

no worries, just renamed it. and man, thanks for the compliments.

leonsilicon commented 1 year ago

hm it seems like you might need to delete the fork altogether first:

image
shellscape commented 1 year ago

Done!