Installation
1. Requirements
- Ruby 3+
- Rails 7+
- Tailwindcss 2+
- ViewComponent 3+
- Fontawesome
2. Add the gem
Add this line to your application's Gemfile:
gem "vitrail"
And then execute:
$ bundle
3. Configuration
Setup Tailwindcss to parse class names from components
In config/tailwind.config.js
,
add before
module.exports
const execSync = require('child_process').execSyncconst output = execSync('bundle show vitrail', { encoding: 'utf-8' })add as last item of
content
:content: [// ...output.trim() + '/app/components/**/*.{erb,haml,html,rb}'],