35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/wabi/generators/install_generator.rb', line 35
def print_next_steps
say "\n Wabi installed. Next steps:", :green
say ""
say " 1. Import tokens AFTER the Tailwind import in app/assets/tailwind/application.css:"
say " @import \"tailwindcss\";"
say " @import \"./wabi/tokens.css\";"
say ""
say " 2. Use 'tailwind' (not 'application') in your stylesheet link tag:"
say " stylesheet_link_tag \"tailwind\", \"data-turbo-track\": \"reload\""
say " (Rails 8.1's :app symbol also works if you keep the default ERB layout.)"
say ""
say " 3. Mount the theme controller on <html> in your layout:"
say " <html data-controller=\"wabi--theme\">"
say ""
say " 4. Add components from the registry:"
say " bin/rails g wabi:add button input card"
say " Components autoload under Components::UI::* (Phlex 2.x convention)."
say " Render them as: render Components::UI::Button.new"
say ""
say " 5. If Tailwind doesn't pick up component classes, add this near the top of"
say " application.css (Tailwind 4 normally auto-detects .rb files, but in"
say " unusual asset paths an explicit @source helps):"
say " @source \"../../components/**/*.rb\";"
say ""
say " Run wabi:install --force later to refresh tokens.css and theme_controller.js"
say " after a gem upgrade (your wabi.lock.json is preserved)."
end
|