I would like to use the SlickGrid plugin in my Rails 3 application. I contains several JS and CSS files that I should include in my HTML page.
It is possible to put all the needed JS files in the public/javascripts
directory and all the CSS files in the public/stylesheets
directory. However, I don't like this solution because it breaks the plugin package files structure.
I would like to put all the plugin files in one place (I thought about vendor/plugins
, is it a better place?), and include the needed files from there. Is that possible ?
What is the proper way to include the JS and CSS files when integrating a plugin ?
I think Jammit can help you accomplish what you're trying to do. Besides packaging, embedding, gzipping your assets, it also allows you to store javascript and stylesheets anywhere in your app. Images (if not embedded) could be a problem though.