Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By adding the following to the config.rb it will allow the environment to be changed between development and production. When in production, debugging will not be printed in the css files.
# Change this to :production when ready to deploy the CSS to the live server.
environment = :development
All credit goes to Bladwin (Erik Baldwin) for his help!
Comment | File | Size | Author |
---|---|---|---|
#2 | omega-set-environment-in-config-rb-2.patch | 380 bytes | C13L0 |
#1 | omega-set-environment-in-config-rb-1.patch | 380 bytes | C13L0 |
Comments
Comment #1
C13L0 CreditAttribution: C13L0 commentedHere is the patch =)
Comment #2
C13L0 CreditAttribution: C13L0 commentedResubmitting, didn't change status to needs review.
Comment #3
fubhy CreditAttribution: fubhy commentedThe right way to do this is "compass compile -e production --force" before deploy.
Comment #4
C13L0 CreditAttribution: C13L0 commentedThank you for the proper command line. Could the proper way be documented in the config.rb file or somewhere here in Omega docs? I spend two days, including asking in #drupal-omega for help. I am new at Omega 4 and these type of tips are helpful and timesaving.
Comment #5
muntjac CreditAttribution: muntjac commentedAs C13L0 said, this should be in the documentation. I spent a long while scratching my head this evening trying to figure this out.
Comment #6
fubhy CreditAttribution: fubhy commentedThis is not really Omega specific as it is rather a Compass / Sass thing. Hitting up Google for this returns http://compass-style.org/help/tutorials/configuration-reference/ as the first result which explains the "environment" parameter and how to override it from the command line. You can of course edit the handbook and put a link to this page there or even explain it there separately. Anyone with a d.o can edit the handbooks anytime - Please help!
Are you really sure we need to add this to config.rb? Who is going to look for answers in there? I'd prefer it in the handbooks tbh.
Comment #7
C13L0 CreditAttribution: C13L0 commentedThis is now documented in the handbook under Common Questions. https://drupal.org/node/1936986