Sha256: f8c07ca2266ce112ed4410a501988c721e7d5c4ea5108ff68b4249e25a6efb37
Contents?: true
Size: 1.59 KB
Versions: 2
Compression:
Stored size: 1.59 KB
Contents
require 'middleman-core/templates' module Middleman module Tansu class Template < Middleman::Templates::Base class_option 'css_dir', default: 'stylesheets', desc: 'The path to the css files' class_option 'js_dir', default: 'javascripts', desc: 'The path to the javascript files' class_option 'images_dir', default: 'images', desc: 'The path to the image files' def self.source_root File.join(File.dirname(__FILE__), 'template') end def build_scaffold! template 'shared/Gemfile.tt', File.join(location, 'Gemfile') template 'shared/config.tt', File.join(location, 'config.rb') 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, 'source', 'templates') empty_directory File.join(location, 'source', 'layouts') copy_file 'source/sample.html.md', File.join(location, 'source/sample.html.md') copy_file 'source/layouts/layout.slim', File.join(location, 'source/layouts/layout.slim') copy_file 'source/stylesheets/all.css.sass', File.join(location, 'source', options[:css_dir], 'all.css.sass') copy_file 'source/stylesheets/github-markdown.css', File.join(location, 'source', options[:css_dir], 'github-markdown.css') copy_file 'source/templates/index.html.slim', File.join(location, 'source', 'templates', 'index.html.slim') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
middleman-tansu-0.0.2 | lib/middleman-tansu/template.rb |
middleman-tansu-0.0.1 | lib/middleman-tansu/template.rb |