Closed Cahllagerfeld closed 1 year ago
Latest commit: cdd05cb2d0eaf44479d710828ef1d703378db04c
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
I've been thinking about this PR today 🤔. With the new structure you developed, do we still need a template structure when someone creates a new Webstone plugin?
If you haven't see this comment yet,, please have a look – it's essential to what I'm about to say 😄.
I'm under the impression that a Webstone plugin, at a very high level, is nothing else other than a SvelteKit lib project, with a src/cli
directory and a few changes as outlined in the linked comment above.
I expected the flow to create a new plugin to be something like this:
npm create webstone-app --type plugin
create-svelte
(I think that's what it's called) to generate a SvelteKit lib projectsrc/cli
, configures tsup
, etc.My worry with the template structure is that it requires maintenance and may be out of sync with a default SvelteKit library project. Maybe we're ok with this 🤔?! As a con to my scripted approach above, that also requires maintenance so we have to discuss what's more effort.
One more thought: I have a dream where any existing SvelteKit library package can be converted to a Webstone plugin with a single command. If we also use a SvelteKit lib project as our base and script the changes we need, we could more easily apply that to an existing SvelteKit lib project.
I'm curious to hear your thoughts on that 🙏
I took the template approach becaseu Svelte and Vite are doing this. My worry with this codemod approach is, that it gets unmaintainable adjusting all the things in package.json (we could use a template for it though). I also had it in mind though
Incredible 🤩! I created a new app and a new plugin, both without any issues. I'll merge it, get it released to NPM and use it to re-create the request-logger
plugin.
closes #377
features: