I thought about this approach, but I think it would be too risky. We'd 
have to think of every way you can possibly change any of the options 
and override them, which seems very error-prone.

- Nathan

Thomas Brian wrote:
> Hi,
>
> Considering that the problem with generating the stylesheets in
> init.rb is that they wouldn't be regenerated when the options are
> changed, could you not simply regenerate them when the options are
> changed ?
>
> That is, if Sass::Plugin.options[:style] is set to a different value,
> automatically call Sass::Plugin.update_stylesheets to update all
> stylesheets.
>
> - Thomas
>
> On 4 oct, 02:10, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>   
>> The only alternative I see is to enable :always_check by default for
>> production. This might be a good decision; checking whether the
>> stylesheets need updating isn't really that expensive.
>>
>> - Nathan
>>
>> Hampton wrote:
>>     
>>> Hrrrm.... I consider complete lack of support for production
>>> generation of CSS to be a bug though...
>>>       
>>> I mean, every single usage of Sass I have seen had required everyone
>>> to set :always_update = true.
>>>       
>>> How would you recommend someone gets it to generate when deploying on
>>> a live server?
>>>       
>>> -hampton.
>>>       
>>> On 10/3/07, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>>>       
>>>> This isn't a bug... at one point, Sass did update the stylesheets when
>>>> init.rb was loaded, but this caused it not to recognize changes to the
>>>> options hash, so it had to be removed. The documentation should be
>>>> updated appropriately, though.
>>>>         
>>>> - Nathan
>>>>         
>>>> Hampton wrote:
>>>>         
>>>>> No, this is a known bug right now. The generation is a little hit and
>>>>> miss... and its more on the miss right now. I'm hoping we can have
>>>>> this sorted out really soon though.
>>>>>           
>>>>> Your solution is about right though for the quick-patching.
>>>>>           
>>>>> -hampton.
>>>>>           
>>>>> On 10/3/07, mike jones <[EMAIL PROTECTED]> wrote:
>>>>>           
>>>>>> Hi,
>>>>>> I recently switched to using haml and sass for rails app and it rocks
>>>>>> \m/(^o^)\m/
>>>>>> I have one question though: becuase the CSS files are now generated
>>>>>> from sass I have excluded them from my subversion repo (mainly because
>>>>>> I want to be able to generate using a different :style depending on
>>>>>> the environment). This causes a problem in production as the css files
>>>>>> are never generated.
>>>>>>             
>>>>>> This documentation suggests that the should be generated "when the
>>>>>> Rails server starts" in production, but I couldn't find anything in
>>>>>> the code (after a cursory glance) where this is the case.
>>>>>>             
>>>>>> I ended up adding the following to my enviroment.rb
>>>>>>             
>>>>>> if RAILS_ENV == 'production'
>>>>>>   Sass::Plugin.options[:style] = :compact
>>>>>>   Sass::Plugin.update_stylesheets
>>>>>> end
>>>>>>             
>>>>>> Is this what you are expect to do or am I misreading the
>>>>>> documentation / code?
>>>>>>             
>>>>>> Cheers
>>>>>> Mike
>>>>>>             
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to