Skip to content
This repository
Browse code

do not get confused by multiple css directories

  • Loading branch information...
commit ea773b9cd691f03c356b09561262127bce4dbd4a 1 parent 510a14d
Peter Hoeg authored April 01, 2012

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. 10  config/compass.rb
10  config/compass.rb
@@ -10,14 +10,20 @@
10 10
 elsif Dir.exists? File.join(@base, 'wp-content')
11 11
   # wordpress
12 12
   @base = File.join @base, 'wp-content', 'themes', 'default'
13  
-elsif Dir.exists? File.join
  13
+elsif Dir.exists? File.join(@base, 'some_random_modx_path')
  14
+  # modx
  15
+  @base = File.join @base, 'gibblygob'
14 16
 else
15 17
   puts 'Unable to find project'
16 18
 end
17 19
 
  20
+found_css = false
18 21
 [ 'css', 'CSS', 'stylesheets' ].each do |d|
19 22
   dir = File.join @base, d
20  
-  css_dir = dir if Dir.exists? dir
  23
+  if Dir.exists?(dir) && !found_css
  24
+    found_css = true
  25
+    css_dir = dir
  26
+  end
21 27
 end
22 28
 sass_dir = File.join @base, 'sass'
23 29
 images_dir = File.join @base, 'images'

0 notes on commit ea773b9

Please sign in to comment.
Something went wrong with that request. Please try again.