Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flowbite CLI #416

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Flowbite CLI #416

wants to merge 13 commits into from

Conversation

CorwinDev
Copy link
Contributor

This PR adds the ability to easily setup the flowbite plugin within the tailwind.config

@zoltanszogyenyi
Copy link
Member

Hey @CorwinDev,

I've tested it locally and this stuff is awesome! Will need some more rigorous testing before merging it. It will be introduced as of v1.6.3 and we will update our docs accordingly.

Cheers,
Zoltan

@zoltanszogyenyi
Copy link
Member

Hey @CorwinDev,

A couple of questions:

  • is the "child_process": "^1.0.2" dependency necessary or can we add it as a dev dependency?

Here's some changes I would recommend based on my usage:

  • if the tailwind.config.js file exists already the success message should be something like: Flowbite has been installed in tailwind.config.js
  • when there is now tailwind.config.js file the message can be: Created new tailwind.config.js file with Flowbite installed.
  • when Flowbite is already installed the message can be: Flowbite has already been installed in tailwind.config.js.
  • when './node_modules/flowbite/**/*.js' is added but require('flowbite') is not installed then it will add './node_modules/flowbite/**/*.js' again (you should check for both)
  • when I run flowbite --version I get Create-Flowbite undefined. Should be something like: v1.6.2 simple

Are there any other commands I'm not aware of? Not sure how to call the one for postcss.config.js.

Otherwise great job! I'll update our docs soon to reflect these new commands.

Cheers,
Zoltan

@zoltanszogyenyi
Copy link
Member

zoltanszogyenyi commented Jan 20, 2023

Hey @CorwinDev,

I think this is almost ready for production, one thing that I'm not a big fan of is keeping the , character after adding it inside the content and plugins area - how about we always add it to the end of the list without the , character?

Screenshot 2023-01-20 at 16 48 36

I also changed the require('flowbite') to require(flowbite/plugin).

Cheers,
Zoltan

@zoltanszogyenyi zoltanszogyenyi changed the title Flowbite cli Flowbite CLI Jan 20, 2023
@zoltanszogyenyi
Copy link
Member

Hey @CorwinDev,

For some reason, I'm getting an error when running node cli.js flowbite init that the tailwind.config.js is invalid.

Here's a screenshot:

Screenshot 2023-01-23 at 16 39 36

I ran the command locally for this repo: https://github.com/themesberg/flowbite/blob/main/tailwind.config.js

Cheers,
Zoltan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants