Skip to content

Add jekyll tailwindcss:install scaffolding command - #31

Open
vormwald wants to merge 2 commits into
mainfrom
install-command
Open

Add jekyll tailwindcss:install scaffolding command#31
vormwald wants to merge 2 commits into
mainfrom
install-command

Conversation

@vormwald

Copy link
Copy Markdown
Owner

Summary

  • One-command setup mirroring tailwindcss-rails's rails tailwindcss:install: creates _tailwind.css and assets/css/styles.tailwindcss.
  • Idempotent — skips existing files.
  • Prints the layout <link> tag and next steps.
  • README gains a Quick start section.

Test plan

  • Verified end-to-end in a throwaway site: fresh install, idempotent re-run, and jekyll build producing real CSS from a scanned class.
  • specs pass

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

vormwald and others added 2 commits August 22, 2026 23:03
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 .tailwindcss workflow, although tailwindcss-ruby is 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)
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