2012-08-14 22:47:11 +02:00
|
|
|
# SMACSS
|
|
|
|
class Middleman::Templates::Smacss < Middleman::Templates::Base
|
|
|
|
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option 'css_dir',
|
|
|
|
:default => 'stylesheets',
|
2012-08-14 22:47:11 +02:00
|
|
|
:desc => 'The path to the css files'
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option 'js_dir',
|
|
|
|
:default => 'javascripts',
|
2012-08-14 22:47:11 +02:00
|
|
|
:desc => 'The path to the javascript files'
|
2013-12-28 01:26:31 +01:00
|
|
|
class_option 'images_dir',
|
|
|
|
:default => 'images',
|
2012-08-14 22:47:11 +02:00
|
|
|
: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!
|
2013-12-28 01:26:31 +01:00
|
|
|
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)
|