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

Tailwind fails if lektor build run from outside the Lektor project directory #4

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented Aug 9, 2023

Since relative paths are used to configure the content paths in tailwind.config.js, tailwind can not find the source content unless it is run from the Lektor project directory.

Lektor-tailwind currently fails to chdir to the Lektor project directory before running tailwind for lektor build. (It does chdir before running tailwind in watch mode for lektor server.)

This fixes that.

Two changes to the tests:

1. Run Lektor from cwd rather than the project directory (setting the
   $LEKTOR_PROJECT environment variable so that Lektor can find the
   project).

2. Rather than just checking for "tailwindcss" in the output CSS file,
   check for one of the classes used in the example
   project (e.g. ".flex") to ensure that tailwind actually found the
   source files.
@dairiki dairiki marked this pull request as ready for review August 9, 2023 16:58
@dairiki
Copy link
Contributor Author

dairiki commented Aug 9, 2023

Note that I've just submitted PR #5, stacked on this one. Before a new release is made, make sure to finalize the fate of that PR as well.

@dairiki
Copy link
Contributor Author

dairiki commented Nov 14, 2023

@frostming Any thoughts on this PR (and on #5)?

@frostming frostming merged commit b94a92e into frostming:main Nov 14, 2023
8 checks passed
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