flowbite-svelte
flowbite-svelte copied to clipboard
Flowbite-Svelte-CLI
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
- to install flowbite-svelte, flowbite-svelte-blocks, flowbite-svelte-icons, or none
- to select primary and secondary colors
- 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
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.
@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
Can I see the repo?
@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.