Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TailwindCSS CDN and ship as tailwindcss-rails #214

Conversation

LEstradioto
Copy link

This PR addresses the request to remove the TailwindCSS CDN and include our own stylesheet, as @excid3 said in issue #198

I'd like to drop the TailwindCSS CDN and just ship our own stylesheet soon if anyone wants to PR that.
We could also probably do the same for the JavaScript.

CDNs were just the easiest to figure out while Rails was in the jsbundling /cssbundling / propshaft / importmap mess. I think things have settled out enough that we can ship our own assets and importmaps. I need to look into how MissionControl handles assets and we can cut a new release with those changes.

Changes

  • Removed CDN link
  • Added tailwindcss-rails gem (installs standalone exe tailwind)
  • Configured Tailwind with PostCSS (changes in host rails, overrided files, reflects in Tailwind)
  • Tailwind compilation:
    • Dev: Compiles with --watch when Rails server runs
    • Prod: Compiles with --minify

Note: Sprockets remains, but Tailwind file is ignored

Questions

I'm not certain if this PR fully meets your expectations.

  1. Should we proceed with similar changes for JavaScript assets?
  2. Are we aiming for importmaps with external links, bundled assets, or a mix?
  3. Is the referenced MissionControl the mission_control-jobs gem? If so, should we follow their approach of using Gemfiles for Stimulus, Turbo, and other packages? like their importmap and gemspec

I can continue with JavaScript assets once we clarify the preferred approach. Please let me know if any adjustments are needed for this PR or if you'd like me to proceed with further changes.

@LEstradioto
Copy link
Author

Just saw test failing will check later!

@excid3
Copy link
Owner

excid3 commented Aug 21, 2024

I think we're going to just drop TailwindCSS entirely and use some plain CSS for the next major release.

@LEstradioto
Copy link
Author

Closing following instructions above

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