Sha256: cacfd2c1e02b62a7b309ce4ce73d27a22ee29326699d46c13ff42d4b2c73062c

Contents?: true

Size: 1.75 KB

Versions: 29

Compression:

Stored size: 1.75 KB

Contents

module Locomotive
  module Wagon
    module Generators
      module Site

        class Foundation5 < Base

          may_use_haml
          may_use_scss

          def choose_haml_over_html
            if haml?
              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

          def choose_scss_over_css
            if scss?
              remove_file File.join(self.destination, 'public/stylesheets/application.css')
              remove_file File.join(self.destination, 'public/stylesheets/foundation.css')
              remove_file File.join(self.destination, 'public/stylesheets/normalize.css')
            else
              remove_dir File.join(self.destination, 'public/stylesheets/foundation')
              remove_file File.join(self.destination, 'public/stylesheets/application.css.scss')
              remove_file File.join(self.destination, 'public/stylesheets/foundation.css.scss')
              remove_file File.join(self.destination, 'public/stylesheets/normalize.css.scss')
            end
          end

          def bundle_install
            super
          end

        end

        Locomotive::Wagon::Generators::Site.register(:foundation5, Foundation5, %{
          A site powered by Foundation (v5.4.7).
        })
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
locomotivecms_wagon-2.2.0.beta1 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.1.1 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.1.0 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.1.0.rc5 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.1.0.rc4 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.1.0.rc3 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.1 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc8 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc7 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc6 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc5 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc4 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc3 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc2 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.rc1 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.pre.beta.2 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-1.5.8 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-2.0.0.pre.beta.1 lib/locomotive/wagon/generators/site/foundation5.rb
locomotivecms_wagon-1.5.7 lib/locomotive/wagon/generators/site/foundation5.rb