Sha256: 56937e21bfbc4a906afac6863fd276d0c07b0f06aed8bec7aea74ea83f3e53da

Contents?: true

Size: 493 Bytes

Versions: 37

Compression:

Stored size: 493 Bytes

Contents

module Middleman
  def self.templates_path
    File.join(`cd ~ && pwd`.chomp, ".middleman")
  end
end

class Middleman::Templates::Local < Middleman::Templates::Base
  def self.source_root
    Middleman.templates_path
  end

  def build_scaffold
    directory options[:template].to_s, location
  end  
end

Dir[File.join(Middleman.templates_path, "*")].each do |dir|
  next unless File.directory?(dir)
  Middleman::Templates.register(File.basename(dir).to_sym, Middleman::Templates::Local)
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
middleman-2.0.0 lib/middleman/templates/local.rb
middleman-2.0.0.rc99 lib/middleman/templates/local.rb
middleman-2.0.0.rc98 lib/middleman/templates/local.rb
middleman-2.0.0.rc97 lib/middleman/templates/local.rb
middleman-2.0.0.rc96 lib/middleman/templates/local.rb
middleman-2.0.0.rc95 lib/middleman/templates/local.rb
middleman-2.0.0.rc93 lib/middleman/templates/local.rb
middleman-2.0.0.rc92 lib/middleman/templates/local.rb
middleman-2.0.0.rc91 lib/middleman/templates/local.rb
middleman-2.0.0.rc8 lib/middleman/templates/local.rb
middleman-2.0.0.rc7 lib/middleman/templates/local.rb
middleman-2.0.0.rc6 lib/middleman/templates/local.rb
middleman-2.0.0.rc5 lib/middleman/templates/local.rb
middleman-2.0.0.rc4 lib/middleman/templates/local.rb
middleman-2.0.0.rc3 lib/middleman/templates/local.rb
middleman-2.0.0.rc2 lib/middleman/templates/local.rb
middleman-2.0.0.rc1 lib/middleman/templates/local.rb
middleman-2.0.0.beta6 lib/middleman/templates/local.rb
middleman-2.0.0.beta5 lib/middleman/templates/local.rb
middleman-2.0.0.beta4 lib/middleman/templates/local.rb