This article was written in 2015, before Webpacker and React became mainstream. Much of this article refers to practices aimed towards Rails 4's asset pipeline.
role) it affects.
Just include them all into one file. In Rails, this should be as easy as: