Sha256: 311a0660989311282998560536675bec281b04b1b4131c98f4c36b8786e358c1

Contents?: true

Size: 672 Bytes

Versions: 6

Compression:

Stored size: 672 Bytes

Contents

require 'thor'
require 'active_support/all'

module Taza
  class SiteGenerator < Thor::Group
    include Thor::Actions

    argument :site_name

    def self.source_root
      File.dirname(__FILE__)
    end

    desc "This will generate your Taza site. Example: taza site foo"
    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
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
taza-3.0.0 lib/taza/generators/site_generator.rb
taza-2.1.0 lib/taza/generators/site_generator.rb
taza-2.0 lib/taza/generators/site_generator.rb
taza-1.0 lib/taza/generators/site_generator.rb
taza-0.9.2.1 lib/taza/generators/site_generator.rb
taza-0.9.2.0 lib/taza/generators/site_generator.rb