WebstoneHQ / webstone-plugins

Start your next full-stack application with Webstone and configure it as you go.
MIT License
85 stars 6 forks source link

Convert existing Sveltekit Application to Webstone plugin/app #399

Open Cahllagerfeld opened 1 year ago

Cahllagerfeld commented 1 year ago

Things to clarify:

mikenikles commented 1 year ago

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.

Cahllagerfeld commented 1 year ago

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?

mikenikles commented 1 year ago

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.