webstone-plugins icon indicating copy to clipboard operation
webstone-plugins copied to clipboard

Convert existing Sveltekit Application to Webstone plugin/app

Open Cahllagerfeld opened this issue 1 year ago • 3 comments

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

Cahllagerfeld avatar Aug 13 '23 19:08 Cahllagerfeld

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:

  1. To create a new app
  2. To create a new plugin
  3. 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.

mikenikles avatar Aug 14 '23 12:08 mikenikles

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?

Cahllagerfeld avatar Aug 14 '23 15:08 Cahllagerfeld

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.

mikenikles avatar Aug 16 '23 05:08 mikenikles