Class: Middleman::Webcomic::Template
- Inherits:
-
Templates::Base
- Object
- Templates::Base
- Middleman::Webcomic::Template
- Defined in:
- lib/middleman-webcomic/template.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
4 5 6 |
# File 'lib/middleman-webcomic/template.rb', line 4 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#build_scaffold ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/middleman-webcomic/template.rb', line 8 def build_scaffold template "template/config.tt", File.join(location, "config.rb") template "template/Rakefile.tt", File.join(location, "Rakefile") template "template/Gemfile.tt", File.join(location, "Gemfile") directory "template/source", File.join(location, "source") # empty_directory File.join(location, "source", options[:css_dir]) # empty_directory File.join(location, "source", options[:js_dir]) # empty_directory File.join(location, "source", options[:images_dir]) empty_directory File.join(location, "comics", "notes") empty_directory File.join(location, "comics", "images") empty_directory File.join(location, "source", "media", "comics") end |
#generate_rack ⇒ Object
23 24 25 |
# File 'lib/middleman-webcomic/template.rb', line 23 def generate_rack template "template/config.ru", File.join(location, "config.ru") end |