Sha256: 01d48bc6bd3b44b9cea4835d9a428a94c18a6b0ca370319cbe3865c9f48fe1a6

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

# encoding: utf-8
module Middleman
  module Presentation
    module Cli
      # This class provides an 'presentation init' command for the middleman CLI.
      class Show < Thor
        include Thor::Actions

        desc 'support_information', 'Collect information for support'
        def support_information
          puts FeduxOrgStdlib::SupportInformation.new.to_s
        end

        desc 'config', 'Show configuration'
        option :defaults, type: :boolean, desc: 'Show default configuration'
        def config
          if options[:defaults]
            capture :stderr do
              puts Middleman::Presentation::PresentationConfig.new(file: nil).to_s
            end
          else
            puts Middleman::Presentation.config.to_s
          end
        end

        desc 'style', 'Show available styles'
        def style
          css_classes = Middleman::Presentation::CssClassExtracter.new.extract Middleman::Presentation.stylable_files, ignore: %w(slides reveal)

          puts "Available css classes in templates used by middleman-presentation:\n"
          css_classes.each { |klass| puts format '  %20s: %s', klass.name, klass.files.to_list }
          puts
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
middleman-presentation-0.15.8 lib/middleman-presentation/cli/show.rb
middleman-presentation-0.15.7 lib/middleman-presentation/cli/show.rb
middleman-presentation-0.15.6 lib/middleman-presentation/cli/show.rb
middleman-presentation-0.15.5 lib/middleman-presentation/cli/show.rb