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

Keep Sprockets in Ruby upgrade #234

Merged
merged 16 commits into from
May 21, 2024

Conversation

p3rcypj
Copy link

@p3rcypj p3rcypj commented May 19, 2024

Although Sprockets was kinda obsolete at some point and Webpacker was the successor and later jsbundling-rails, rails new blog stills keeping Sprockets.

Introduction

The following information was provided by an AI assistant to help explain the current status and evolution of the Sprockets gem. This summary outlines why Sprockets remains a relevant and viable option for asset management in Rails applications.

Status and Evolution of the Sprockets Gem

Background and Initial Importance

Sprockets has been a fundamental tool in the Ruby on Rails ecosystem for asset management. It allows for the compilation, minification, and concatenation of CSS and JavaScript files. During the Rails 3 and 4 era, Sprockets was the go-to solution for these tasks.

Emergence of Alternatives

With the rise of modern JavaScript tools, Webpack became a popular alternative due to its advanced features and robust ecosystem. This led to an increasing adoption of Webpack, especially after the introduction of the Webpacker gem in Rails 5.

Continued Relevance and Updates

Despite the popularity of alternatives like Webpack, Sprockets has continued to evolve:

  1. Recent Improvements: The latest versions of Sprockets have introduced significant updates, including support for ES6, better integration with modern JavaScript tools, and performance enhancements.

  2. Community Contributions: The community has actively contributed to keeping Sprockets up-to-date, ensuring compatibility with the latest versions of Rails and Ruby.

Current Considerations

  • Compatibility: Sprockets remains compatible with Rails 6 and 7 and continues to receive maintenance and updates.
  • Simplicity: For projects that do not require complex asset management configurations, Sprockets offers a simple and effective solution.
  • Rails Ecosystem Integration: The native integration with Rails remains a significant advantage, especially for developers who prefer a straightforward and traditional setup.

In summary, while Sprockets faced competition from more modern tools like Webpack, it remains a viable and up-to-date option for asset management in Rails applications. Continuous improvements and contributions from the community have ensured its relevance, making it a suitable choice for many projects.

Sources

  1. RubyGems.org Sprockets Page: Provides information about the latest releases and updates of the Sprockets gem.

  2. Sprockets GitHub Repository: Contains the source code, issue tracker, and release notes detailing recent improvements and community contributions.

  3. Rails Guides on Asset Pipeline: Explains how Sprockets is used within the Rails framework for asset management.

  4. Webpacker GitHub Repository: Provides context on the emergence of Webpack as an alternative to Sprockets in the Rails ecosystem.

  5. Ruby on Rails Blog: Offers insights and announcements regarding updates and changes to Rails and its associated tools, including Sprockets.

@p3rcypj
Copy link
Author

p3rcypj commented May 20, 2024

Bootstrap downgrade to version 4: https://github.com/twbs/bootstrap-rubygem/tree/4.6-stable. Bootstrap 5 removes the previous way of handling margins and padding in favor of flex (ms, me: start, end). It also fixes carousel styles.

@p3rcypj
Copy link
Author

p3rcypj commented May 20, 2024

Uh, oh... so on feature/upgrade-ruby we also could use Webpack and only use sprockets for CSS and images

Copilot:

In Rails 6, by default, JavaScript assets are managed by Webpacker, and CSS and images are managed by Sprockets. The manifest.js file is used by Sprockets to determine which assets to compile.

@p3rcypj
Copy link
Author

p3rcypj commented May 20, 2024

Are extendProtVista, featureAnalysis, myProtVista, and interface_viewer projects still being used?

@p3rcypj
Copy link
Author

p3rcypj commented May 21, 2024

Turbolinks was removed, should we use it? As far as I could, I didn't see that it was being used, but I don't have enough knowledge for that

@adrianq adrianq marked this pull request as ready for review May 21, 2024 09:12
@adrianq adrianq merged commit 5b9678d into feature/upgrade-ruby May 21, 2024
1 check failed
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.

3 participants