Class: Taza::SiteGenerator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/taza/generators/site_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/taza/generators/site_generator.rb', line 10

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#siteObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/taza/generators/site_generator.rb', line 15

def site
  name = site_name.underscore

  template('templates/site/site.yml.tt', "config/#{name}.yml")
  template('templates/site/site.rb.tt', "lib/sites/#{name}.rb")
  empty_directory "lib/sites/#{name}"
  empty_directory "lib/sites/#{name}/flows"
  empty_directory "lib/sites/#{name}/pages"
  empty_directory "lib/sites/#{name}/pages/partials"
end