14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/lono/sequence.rb', line 14
def self.source_root
starter_projects = File.expand_path("../starter_projects", File.dirname(__FILE__))
template_folder = "#{starter_projects}/#{template_name}"
unless File.exist?(template_folder)
templates = Dir.glob("#{starter_projects}/*")
.select { |f| File.directory?(f) }
.map { |f| " #{File.basename(f)}" }
.sort
puts "The TEMPLATE=#{ENV['TEMPLATE']} you specified does not exist.".colorize(:red)
puts "The available templates are:\n#{templates.join("\n")}"
exit
end
template_folder
end
|