Sha256: c8847200cbcda5f7e0e49d1c79995243eed72cbd70baa7b6dfc3493686aaa41d

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

module Middleman
  module Webcomic
    class Template < Middleman::Templates::Base
      def self.source_root
        File.dirname(__FILE__)
      end
  
      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
  
      def generate_rack
        template "template/config.ru", File.join(location, "config.ru")
      end
    end
  end
end

Middleman::Templates.register(:webcomic, Middleman::Webcomic::Template)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
middleman-webcomic-0.5.1 lib/middleman-webcomic/template.rb
middleman-webcomic-0.5.0 lib/middleman-webcomic/template.rb