Files
slackthemes/lib/screenshot_generator.rb
T
Ufuk Kayserilioglu 511718e973 Add digest to theme images to not keep rebuilding them
The digest is based on the colors of theme, so will change when the colors change
2015-03-16 14:55:18 +02:00

20 lines
517 B
Ruby

require 'lib/screenshot'
class ScreenshotGenerator < ::Middleman::Extension
include Capybara::DSL
def initialize(app, options_hash={}, &block)
super
app.before_build do |builder|
Screenshot.prepare
data = YAML.load_file('data/themes.yml')
data.each do |theme|
Screenshot.new(theme).generate_theme_image
end
puts "Hello World"
# builder.run './my_deploy_script.sh'
end
end
end
::Middleman::Extensions.register(:screenshot_generator, ScreenshotGenerator)