Sha256: f327515562587a0e07309d210121c30cc053aaec8c3692a52a7bffaf740122e7

Contents?: true

Size: 1.16 KB

Versions: 8

Compression:

Stored size: 1.16 KB

Contents

module Locomotive
  module Wagon
    module Generators
      module Site

        class Bootstrap < Base

          def copy_sources
            directory('.', self.destination, { recursive: true }, {
              name:     self.name,
              version:  Locomotive::Wagon::VERSION
            })
          end

          def choose_haml_over_html
            if yes?('Do you prefer HAML templates ?')
              remove_file File.join(self.destination, 'app/views/pages/index.liquid')
              remove_file File.join(self.destination, 'app/views/pages/404.liquid')
              remove_file File.join(self.destination, 'app/views/snippets/footer.liquid')
            else
              remove_file File.join(self.destination, 'app/views/pages/index.liquid.haml')
              remove_file File.join(self.destination, 'app/views/pages/404.liquid.haml')
              remove_file File.join(self.destination, 'app/views/snippets/footer.liquid.haml')
            end
          end

        end

        Locomotive::Wagon::Generators::Site.register(:bootstrap, Bootstrap, %{
          A LocomotiveCMS site powered by Twitter bootstrap (v2.2.2).
        })
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.3.0 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.2.2 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.2.1 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.2.0 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.1.0 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.0.2 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.0.1 lib/locomotive/wagon/generators/site/bootstrap.rb
locomotivecms_wagon-1.0.0 lib/locomotive/wagon/generators/site/bootstrap.rb