Add jekyll tailwindcss:install scaffolding command - #31
Open
vormwald wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The command is idempotent, correctly registered, documented, and covered by focused tests.
Pull request overview
Adds an idempotent jekyll tailwindcss:install command for scaffolding Tailwind CSS files and guiding setup.
Changes:
- Adds and registers the install command.
- Tests file creation, preservation, logging, and registration.
- Documents quick start and simplifies converter log interpolation.
File summaries
| File | Description |
|---|---|
lib/jekyll/commands/tailwind.rb |
Implements scaffolding command. |
lib/jekyll-tailwindcss.rb |
Registers the command implementation. |
spec/jekyll/commands/tailwind_spec.rb |
Tests installation behavior. |
README.md |
Documents quick-start usage. |
lib/jekyll/converters/css.rb |
Simplifies CSS generation logging. |
lib/jekyll/converters/tailwindcss.rb |
Simplifies Tailwind generation logging. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
One-command setup mirroring tailwindcss-rails's `rails tailwindcss:install`: creates `_tailwind.css` and `assets/css/styles.tailwindcss`, is idempotent (skips existing files), and prints the layout <link> tag plus next steps. README gains a Quick start section. Co-Authored-By: Claude <[email protected]>
The name collided conceptually with Jekyll::Commands, which holds Jekyll CLI subcommands. This module wraps shell invocations of the tailwindcss CLI, so CLI reads more accurately and removes the ambiguity between lib/jekyll/tailwindcss/commands.rb and lib/jekyll/commands/tailwind.rb. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
vormwald
force-pushed
the
install-command
branch
from
August 23, 2026 03:07
3157e4d to
3fba237
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The scaffold ignores configured/source-relative paths and generates an unsupported workflow for Tailwind v3 users.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
lib/jekyll/commands/tailwind.rb:38
- This always scaffolds the v4-only
.tailwindcssworkflow, althoughtailwindcss-rubyis unconstrained and the project explicitly supports pinned v3 releases. For a v3 installation, the existing converter rejects this extension, so the advertised one-command setup produces no CSS. Detect the installed major version and either create the v3-compatible scaffold or stop with a clear upgrade/version message before writing files.
create_file(File.join(source, "assets", "css", "styles.tailwindcss"), STYLES_TAILWINDCSS_CONTENT)
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Balanced
Comment on lines
+34
to
+38
| config = configuration_from_options(opts) | ||
| source = config["source"] | ||
|
|
||
| create_file(File.join(source, "_tailwind.css"), TAILWIND_CSS_CONTENT) | ||
| create_file(File.join(source, "assets", "css", "styles.tailwindcss"), STYLES_TAILWINDCSS_CONTENT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rails tailwindcss:install: creates_tailwind.cssandassets/css/styles.tailwindcss.<link>tag and next steps.Test plan
jekyll buildproducing real CSS from a scanned class.Note
Trivially conflicts with the subprocess-robustness PR (#28) in the require block of
lib/jekyll-tailwindcss.rb— whichever merges second needs a 30-second rebase.🤖 Generated with Claude Code