5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/compass-themes/railties/generators/generator_helper.rb', line 5
def available_themes
themes = {}
Dir["#{LOCAL_ROOT}/../../templates/**/*.html.haml"].each do |template|
short_name = File.basename(template).gsub(/(.+)\.html\.haml/) { $1 }
themes[short_name.to_sym] = []
Dir["#{LOCAL_ROOT}/../../stylesheets/#{short_name}/*.scss"].each do |stylesheet|
next unless stylesheet.include?('.theme')
themes[short_name.to_sym] << File.basename(stylesheet).gsub(/^\_(.+)\.theme\.scss/) { $1 }
end
end
themes
end
|