webstone-plugins
webstone-plugins copied to clipboard
Convert existing Sveltekit Application to Webstone plugin/app
Things to clarify:
- Do we want to handle this inside
create-webstone-app
, or do we want to have this as part of the cli for example
Do we want to handle this inside create-webstone-app, or do we want to have this as part of the cli for example
I would add it to create-webstone-app
, but only to convert a SvelteKit lib package into a Webstone plugin. I think we no longer have a concept of converting a SvelteKit app into a Webstone app, do we?
I see 3 use cases for create-webstone-app
:
- To create a new app
- To create a new plugin
- To convert a SvelteKit lib package into a Webstone Plugins package.
If a user runs npm create webstone-app
without any --type
flag, we check if the current directory is an existing SvelteKit lib package and if so, ask the user if they want to convert it. We can determine that if the package.json
contains a package
script.
How would the signature of our create-webstone
function that we expose through code look like? Would it be a flag, or should the check be done automatically?
My first instinct is to make it a parameter. It's likely the easier approach and less magic happens from the eyes of the developer who wants to integrate it into their code.