flowbite-svelte icon indicating copy to clipboard operation
flowbite-svelte copied to clipboard

Flowbite-Svelte-CLI

Open shinokada opened this issue 1 year ago • 5 comments

Summary

Having flowbite-svelte-cli simplifies the installation of SvelteKit, Tailwind CSS, flowbite, flowbite-svelte, dependencies, and color scheme selection.

Basic example

npm create flowbite-svelte@latest my-app

Dependencies:

  • create-svelte
  • @clack/prompts
  • kleur
  • mri ?
  • fs-extra ?
  • got ?
  • semver ?
  • ?

Process

  • SvelteKit using create-svelte
  • Explanation about CLI, You can choose
  1. to install flowbite-svelte, flowbite-svelte-blocks, flowbite-svelte-icons, or none
  2. to select primary and secondary colors
  3. to config tailwind.config.cjs
  • Install tailwind CSS using svelte-add
  • shows checkboxes asking what you want to install flowbite-svelte, flowbite-svelte-blocks, flowbite-svelte-icons, or none
  • Selection of primary and secondary colors
  • Over-write tailwind.config.cjs according to the primary/secondary colors

shinokada avatar May 03 '23 22:05 shinokada

Would this not be possible with a svelte-add script rather than an entire CLI to bootstrap the project? Something I've noticed from other UI libraries which rely heavily on CLI to bootstrap is that it deters people with existing projects of adopting them.

Additionally, there are other create-XX to bootstrap things that are more annoying than installing a few libraries - think of the t3-stack, how would this work if something comparable in the Svelte ecosystem was being used?

Definitely like the idea to be able to select primary and secondary colors and have them just default to blue if none are defined in the tailwind.config though, that will be a gamechanger.

huntabyte avatar May 04 '23 14:05 huntabyte

@shinokada, I build a simple cli that setup flowbite-svelte project template, tell me if this is Ok and can I raise a PR. Used this this as the base template.

https://github.com/themesberg/flowbite-svelte/assets/85363195/3324c839-178d-4123-bc23-3f8bb5c01621

vasucp1207 avatar Jul 22 '23 07:07 vasucp1207

Can I see the repo?

shinokada avatar Jul 22 '23 14:07 shinokada

Can I see the repo?

@shinokada, Repo

vasucp1207 avatar Jul 22 '23 16:07 vasucp1207

@vasucp1207 Seeing the repo, just copying from a repo is not a sustainable solution. Ideally it should go through the process of normal installation when you use CLI.

shinokada avatar Jul 31 '23 05:07 shinokada