Sha256: b7c35ae17c37b76c961d5ce5c12a47537abe7da5183a9a054a9227454a85fa41

Contents?: true

Size: 1.17 KB

Versions: 8

Compression:

Stored size: 1.17 KB

Contents

module Locomotive
  module Builder
    module Generators
      module Site

        class Bootstrap < Base

          def copy_sources
            directory('.', self.destination, { recursive: true }, {
              name:     self.name,
              version:  Locomotive::Builder::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::Builder::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_builder-1.0.0.alpha8 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha7 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha6 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha5 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha4 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha3 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha2 lib/locomotive/builder/generators/site/bootstrap.rb
locomotivecms_builder-1.0.0.alpha1 lib/locomotive/builder/generators/site/bootstrap.rb