On Sat, Jul 2, 2011 at 9:27 PM, Victor Costan <[email protected]> wrote:

> Thank you very much, for your detailed response, Chris! I didn't know
> @import can take globs, I can definitely use that to clean some things
> up!
>

It's a feature that's only available via sass-rails or if they install my
sass-globbing plugin (https://github.com/chriseppstein/sass-globbing).


> Just to make sure I understand, are you suggesting that my plugin's
> generator should copy common.scss into app/assets/stylesheets, and
> then use @import with a glob somewhere to pull everything in?
>

I was suggesting that you shouldn't put them in public anymore. Best to
think of public like tmp.


> I was hoping I can have common.scss into a plugin's
> app/assets/stylesheets directory, which could be updated independently
> of the application, just like jquery-rails updates its JavaScript
> files. However, if I do that, @importing with a glob won't work,
> because the plugin's app/assets/stylesheets would be somewhere in my
> gems directory.
>

You can add your libraries to the sass load path and import them without
globbing. This is basically what compass does. You can add to the sass load
paths in a railtie:

config.sass.load_paths << "/path/to/my/gems/stylesheets"


> I'm sorry for being slow in understanding your answer, and I'm
> grateful for any further insight you can share!
>

No problem. Hit me up in IRC if you need more clarification.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to