-
-
Notifications
You must be signed in to change notification settings - Fork 74
Feat - Community add-on #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
commit: |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
0630be5 to
7cf5b27
Compare
This comment was marked as outdated.
This comment was marked as outdated.
manuel3108
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest will come at a later point.
manuel3108
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so cool finally seeing progress in that direction!!! At this point this is only a code review, I havn't tested or played around with anything yet.
Random thought: Addon's for migrations? Obviously not something we should implement here, but we should check that we don't block any imports. But using sv/core and sv/testing seems totally future-proof, so we should be good to go.
Automated testing for community addons? How can we check that we don't break anything for community addons? We should be pretty fine as they are using more or less exactly the same api as the official addons, but maybe you have a crazy idea that could help with that. (I saw the snapshot test, I think im currently more concerned about type missmatches and stuff, although this is a great starging point)
| - run: pnpm exec playwright install chromium | ||
| - run: pnpm build | ||
| - run: pnpm test | ||
| preview-release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should revert this here. I found it always helpful that the preview release get's published before all of the testing is completed after roughly 5 minutes. Also has nothing to do with community addons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 it's not directly linked with community addons 🫣
It's not after all tests, Just after build & lint (1min)
Because I had a few update of pkg while it was not even building... so everything was broken in pkg
Maybe was just unfortunate?!
revert? no revert? Let me know
| - [`tailwindcss`](tailwind) | ||
| - [`vitest`](vitest) | ||
|
|
||
| ## Community add-ons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider extracting this into a separate page, as most of this is relevant for sv add as well.
Also, the docs about the file: protocol should be in the creating addons developer section, not in the user section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to organise all this! :o But yeah, we can move things 👍
I'm using file: protocol as a scaffolding tool. It's not "all users", but I'm sure some people could find this cool and have some usecases. No?
| title: add-on | ||
| --- | ||
|
|
||
| Typically, an `add-on` looks like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You showed a recording that displayed a lot more info than this is currently doing. I guess you still have some additional progress locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest is more in svelte.dev repo.
One thing is sveltejs/svelte.dev#1720 as a minimal step.
Other thing are locally in my svelte.dev repo... We need to speak ;)
Let's keep it open
| // from internals | ||
| export { defineAddon, defineAddonOptions } from './core/addon/config.ts'; | ||
| export { color } from './cli/add/utils.ts'; | ||
| // TODO JYC: move to utils all these bellow? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To speak! :D
packages/sv/lib/core.ts
Outdated
| export const svelte = { | ||
| ensureScript: ensureScript as typeof ensureScript, | ||
| addSlot: addSlot as typeof addSlot, | ||
| addFragment: addFragment as typeof addFragment | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not the same as for the other langs? I thought they were setup identically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a test, yes!
Doing this enable to have JSDoc comments that can be used in doc! and in code when user will import svelte 👍
So in core.ts we should never export *. I did only a few JSDoc test and wanted to speak with you do to more ^^
Co-authored-by: Manuel <[email protected]>
Co-authored-by: Manuel <[email protected]>
Co-authored-by: Manuel <[email protected]>
Co-authored-by: Manuel <[email protected]>
Main topic
Links & notes along the way
esrap#620parse&printfromsvelte/compiler#751--communityflag #84@sveltejs/cli-core#55tar-fs#577) or some alternativecommunity-addonsfoldersv/coreDo this only for npm addons-> so that things are prepared// TODO JYCNext step?
dependOnnot only officials?