Add support for custom tailwind css installs #152
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
Given the existence of node-wheel-binaries on PyPI and the broken PyCharm plugin for Tailwind CSS, which relies on a locally installed Tailwind CSS, it might be an idea to another mode for the library.
The library currently supports three modes:
TAILWIND_CLI_PATH
to the complete path.TAILWIND_CLI_SRC_REPO
andTAILWIND_CLI_ASSET_NAME
.With the introduction of Tailwind CSS 4.x support, the library relies on checking the major version of Tailwind CSS. This is necessary because of the change behaviour concerning configuration but also because the
--config
parameter isn't available in Tailwind CSS CLI 4.x.This breaks as mentioned in #150 (comment) the behavior for externally build versions of Tailwind CSS, that don't follow the official versioning scheme. This applies for example to https://github.com/dobicinaitis/tailwind-cli-extra if you try to install it using the settings
TAILWIND_CLI_SRC_REPO
andTAILWIND_CLI_ASSET_NAME
.Based on the things stated above, I am considering changing the behavior of the library and supporting the following modes:
TAILWIND_CLI_PATH
to the absolute path.TAILWIND_CLI_SRC_REPO
andTAILWIND_CLI_ASSET_NAME
.node-wheel-binaries
and fully encapsulated by the library. It would only introduce a package.json file to the project.For mode 2, 3 and 4, a new variable
TAILWIND_CLI_LEGACY
is introduced. If it is set to True, the library assumes the interface of Tailwind CSS CLI 3.x and otherwise the interface of Tailwind CSS CLI 4.x. The default would be False.The advantage of mode 4 is, that it adds support for PyCharm without any awful hacks, without the necessity to handle a node installation yourself. And it might also be the easiest way to add support for DaisyUI and friends.
Discuss! Feedback welcome.
The text was updated successfully, but these errors were encountered: