A typical extjs example application includes the extjs library by referencing files such as:
ext-all.css
ext-all.js
What’s the ‘rails 3.1 way’ of including these files, noting that they reference hundreds? of files in subdirectories
(e.g. ext-4.0.2/resources/themes/stylesheets/ext4/default/_all.scss)
and there are relative paths:
(e.g. background-image:url(‘../../resources/themes/images/default/shared/shadow.png’))
I’m tried numerous combinations of require_tree et al., but can’t seem to get it to work.
I’m wondering if I need to mess w/ ‘provide’, but I can’t seem to find the documentation I need.
What you want is for this file to compile via the Rails asset pipeline:
To get this to work, I learned a few things the hard way:
(more info: getting error after ugrading to sass-3.1.8)
Here’s how to get up and running:
Put this into your config/application.rb:
Put the ExtJS stylesheets (the ext4/default directory in the SDK) here:
Put my-ext-theme.scss into app/assets/stylesheets and use it like you normally would with rails. It will call this code:
That will bring in all of the ExtJS definitions, and you should be on your way.