middleman/middleman-core/lib/middleman-more/templates/smacss.rb

30 lines
888 B
Ruby
Raw Normal View History

2012-08-14 22:47:11 +02:00
# SMACSS
class Middleman::Templates::Smacss < Middleman::Templates::Base
class_option 'css_dir',
2014-04-29 19:44:24 +02:00
default: 'stylesheets',
desc: 'The path to the css files'
class_option 'js_dir',
2014-04-29 19:44:24 +02:00
default: 'javascripts',
desc: 'The path to the javascript files'
class_option 'images_dir',
2014-04-29 19:44:24 +02:00
default: 'images',
desc: 'The path to the image files'
2013-12-28 19:14:15 +01:00
2012-08-14 22:47:11 +02:00
# Template files are relative to this file
# @return [String]
def self.source_root
File.dirname(__FILE__)
end
# Output the files
# @return [void]
def build_scaffold!
template 'shared/config.tt', File.join(location, 'config.rb')
directory 'smacss/source', File.join(location, 'source')
empty_directory File.join(location, 'source')
2012-08-14 22:47:11 +02:00
end
end
# Register the template
Middleman::Templates.register(:smacss, Middleman::Templates::Smacss)