I found a good example here - https://github.com/jsuder/sprockets-strict-mode
Rails gem to prepend a couple of lines to application.js
-
22-06-2023 - |
Frage
I'd like to write a gem that prepends some license tags to a rails app's JavaScript files after they've been through the asset pipeline. Does anyone know an example gem that does something similar that I can look at?
I'm guessing I can do this with a Sprockets post-processor. Since this is the first ruby gem I've ever written, I need some guidance.
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow