{"id":15512235,"url":"https://github.com/tarellel/tailwind_views_generator","last_synced_at":"2025-11-11T19:04:16.946Z","repository":{"id":59157203,"uuid":"358937896","full_name":"tarellel/tailwind_views_generator","owner":"tarellel","description":"A Rails generator for creating Tailwind styled views (Erb, Slim, and HAML).","archived":false,"fork":false,"pushed_at":"2021-12-31T03:21:34.000Z","size":48,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T16:16:55.021Z","etag":null,"topics":["gem","generator","rails","ruby","tailwindcss","template"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarellel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-17T17:12:47.000Z","updated_at":"2022-12-07T06:15:36.000Z","dependencies_parsed_at":"2022-09-13T20:10:29.312Z","dependency_job_id":null,"html_url":"https://github.com/tarellel/tailwind_views_generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarellel%2Ftailwind_views_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarellel%2Ftailwind_views_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarellel%2Ftailwind_views_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarellel%2Ftailwind_views_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarellel","download_url":"https://codeload.github.com/tarellel/tailwind_views_generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311557,"owners_count":21569057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","generator","rails","ruby","tailwindcss","template"],"created_at":"2024-10-02T09:53:32.419Z","updated_at":"2025-11-11T19:04:11.891Z","avatar_url":"https://github.com/tarellel.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Tailwind Views Generator\n\n![](https://ruby-gem-downloads-badge.herokuapp.com/tailwind_views_generator?type=total)  [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT) [![Gem Version](https://badge.fury.io/rb/tailwind_views_generator.svg)](https://badge.fury.io/rb/tailwind_views_generator)\n\nThis gem is used for generating tailwind based scaffold views for your Rails application. They can be Erb, Slim, or HAML. You can include pagination (using Pagy), simple_form (for the form components), and if you'd like you can utilize the meta-tags gems to all dynamic page titles when switching between your view components.\n\nThis is more or less a sister project of the [bootstrap_views_generator](https://github.com/tarellel/bootstrap_views_generator) and [semantic_ui_views_generator](https://github.com/tarellel/semantic_ui_views_generator) gems, but for those who prefer to use TailwindCSS. If you are using [simple_form](https://github.com/heartcombo/simple_form) I've also created a simple_form [config](https://github.com/tarellel/simple_form-tailwind) for styling your forms with Tailwind.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tailwind_views_generator', group: :development\n\n# Before continuing make sure you have the tailwind yarn package or rails tailwind gem installed and included in your application.scss file so tailwind will be available for the applications frontend\ngem 'tailwindcss-rails'\n\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tailwind_views_generator\n\n## Usage\n\n```shell\nUsage:\n  rails g tailwind_views:install [options]\n\nOptions:\nOptions:\n-t, [--template-engine=TEMPLATE_ENGINE]     # Indicates when to generate using a designated template engine (erb, slim, haml)\n                                            # Default: erb\n--simpleform                                # Indicates if simple_form is to be used to generate the forms\n                                            # Default: false\n--pagination                                # Specify if you want to add pagination to the index pages\n                                            # Defaults: false (requires Pagy to use pagination)\n--metatags                                  # If you want the pages titles to use the meta-tags gem function for the page title\n                                            # Default: false\n--layout                                    # Over-write your application layout file with a Tailwind based layout\n                                            # Default: false\n--devise                                    # If you want to generate tailwind based devise views\n                                            # Default: false\n--skip_javascript                           # If you want to skip adding javascript_include_tag || javascript_pack_tag to the layouts\n                                            # Default: false\n--skip_turbolinks                           # Do you want to skip associating turbolinks with the assets and views\n                                            # Default: false\n```\n\n## Options\n\n##### Template Engines\n\nSupported Template Engines\n\n* ERB\n* HAML\n* Slim\n\n**HAML**\n\nMake sure you have haml added to your your Gemfile\n```ruby\ngem 'haml-rails'\n\n# generate haml views\nrails g tailwind_views:install --template_engine=haml\n```\n\n**Slim**\nMake sure you have Slim added to your Gemfile\n```ruby\ngem 'slim-rails'\n\n# generate Slim views\nrails g tailwind_views:install --template_engine=slim\n```\n\n#### Pagination\n\nEnsure you have [Pagy](https://github.com/ddnexus/pagy) gem installed\n```ruby\ngem 'pagy'\n```\n\nAnd ensure you have pagy's [tailwind extras](https://ddnexus.github.io/pagy/extras/tailwind) included in your applications stylesheets to format your pagination.\n\n\n#### Meta-Tags\nEnsure you have the [meta-tags](https://github.com/kpumuk/meta-tags) gem installed\n```ruby\ngem 'meta-tags'\n```\n\n### Examples\n\nGenerate tailwind views with pagination enabled\n```shell\nrails g tailwind_views:install --pagination\n```\n\nGenerate tailwind views with slim and using simple_form\n```shell\nrails g tailwind_views:install --template_engine=slim --simpleform\n```\n\nGenerate tailwind scaffolds, devise views, while using simpleform, metatags, and slim template engine.\n```shell\n rails g tailwind_views:install --devise --simpleform --metatags --template_engine=slim\n```\n\n### Extras\n\n* If you like to use the [meta-tags](https://github.com/kpumuk/meta-tags) gem to add page titles based on the views.\n* Pagination defaults to using [Pagy](https://github.com/ddnexus/pagy) on the index pages.\n* With [simple_form](https://github.com/plataformatec/simple_form) it generates a `config/initializers/simple_form.rb` file for your simple_form formatting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarellel%2Ftailwind_views_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarellel%2Ftailwind_views_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarellel%2Ftailwind_views_generator/lists"}