{"id":15512960,"url":"https://github.com/IcaliaLabs/tailwindcss-rails","last_synced_at":"2025-10-12T09:31:55.040Z","repository":{"id":32681807,"uuid":"139490726","full_name":"IcaliaLabs/tailwindcss-rails","owner":"IcaliaLabs","description":"A gem to install Tailwind CSS - https://tailwindcss.com/","archived":false,"fork":false,"pushed_at":"2022-12-14T03:55:17.000Z","size":35,"stargazers_count":89,"open_issues_count":12,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-06T03:23:01.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/IcaliaLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-07-02T20:25:17.000Z","updated_at":"2025-03-27T12:38:43.000Z","dependencies_parsed_at":"2023-01-14T21:54:55.730Z","dependency_job_id":null,"html_url":"https://github.com/IcaliaLabs/tailwindcss-rails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IcaliaLabs/tailwindcss-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Ftailwindcss-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Ftailwindcss-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Ftailwindcss-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Ftailwindcss-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IcaliaLabs","download_url":"https://codeload.github.com/IcaliaLabs/tailwindcss-rails/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Ftailwindcss-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010939,"owners_count":26084837,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-02T09:53:57.209Z","updated_at":"2025-10-12T09:31:55.006Z","avatar_url":"https://github.com/IcaliaLabs.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Tailwind CSS Rails\n\nThe `tailwindcss` gem helps you to easily install the Tailwind CSS framework by using WebPack and the `webpacker` gem.\n\n\n\n## Table of contents\n\n- [Installing the gem](#installing-the-gem)\n- [Contributing](#contributing)\n- [License](#license)\n- [Code of conduct](code-of-conduct)\n\n\n\n## Installing the gem\n\nIn order to run the install generator from `tailwindcss` you need to add the [webpacker](https://github.com/rails/webpacker) gem, and run the installation setup for it.\n\n\n\n#### Installing webpacker + tailwindcss\n\ntailwindcss-rails ~\u003e 1.0.0 supports Rails ~\u003e5.2.0 and tailwindcss ~\u003e 1.0\n\nYou first need to add the following gems to your `Gemfile`:\n\n```\n# Gemfile\ngem 'webpacker', '~\u003e 4.0.0'\ngem 'tailwindcss', '~\u003e 1.0.0'\n```\n\nRun the following:\n\n```shell\nbundle\n\nbundle exec rails webpacker:install\n\nbundle exec rails g tailwindcss:install\n```\n\nThis will prepare the application to use tailwind by:\n\n1. Adding tailwind by using `yarn`\n2. Create a `javascript/css` directory\n3. Init tailwind from the `node_modules`\n4. Setup tailwind\n5. Configure `postcss.config.js` file\n\nIf you want to know how this is achieved, you can go [here](https://github.com/IcaliaLabs/tailwindcss-rails/blob/master/lib/generators/tailwindcss/install_generator.rb).\n\nThese two lines will compile the assets from the `app/javascript/css` folder.\n\nYou must add the following to your `config/initializers/content_security_policy.rb`:\n```ruby\n  Rails.application.config.content_security_policy do |policy|\n    policy.connect_src :self, :https, 'http://localhost:3035', 'ws://localhost:3035' if Rails.env.development?\n  end\n```\n\nInside of `config/webpacker.yml`, you must set `extract_css: true` default is `false`.\n\nYou have to add these two lines to your `application` layout in order to compile it.\n\n```ruby\n\u003c%= stylesheet_pack_tag    'application' %\u003e\n\u003c%= javascript_pack_tag 'application' %\u003e\n```\n\nWebpacker will automatically compile your assets while a `bundle exec rails s` is active.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/IcaliaLabs/tailwindcss-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Tailwindcss project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tailwindcss/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIcaliaLabs%2Ftailwindcss-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIcaliaLabs%2Ftailwindcss-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIcaliaLabs%2Ftailwindcss-rails/lists"}