samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
183 stars 124 forks source link

Explore Webpack(er) for replacing jquery-datatables-rails #3920

Open jrgriffiniii opened 5 years ago

jrgriffiniii commented 5 years ago

The jquery-datatables-rails Gem currently specifies sass-rails as a dependency, and rails new for 5.1.x/5.2.x releases pins to the latest 5.1.x release of this Gem:

workspace1 % rails _5.2.3_ new my_app
      create
      create  README.md
      create  Rakefile

...

workspace1 % cd my_app
my_app HEAD % bundle list | grep sass
  * sass (3.7.4)
  * sass-listen (4.0.0)
  * sass-rails (5.1.0)

Given that there is already an existing issue within the generation of Hyrax for this Gem (please see https://github.com/samvera/hyrax/blob/master/lib/generators/hyrax/install_generator.rb#L152 and https://github.com/rweng/jquery-datatables-rails/issues/225), perhaps shifting the integration of Datatables to Webpack (using https://datatables.net/download/npm, https://webpack.js.org/configuration/externals/, and https://github.com/rails/webpacker) could be explored in order to deprecate this Gem dependency. Please see https://github.com/samvera/hyrax/issues/3919 for a bit more context.

ghost commented 5 years ago

Is it insane to consider use of webpacker for more of the asset pipeline or just for this?