Sha256: 7ec0851438622e3238e3801cc4a681432d08629944f4353f5292e3ede0648843

Contents?: true

Size: 795 Bytes

Versions: 4

Compression:

Stored size: 795 Bytes

Contents

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

      namespace :style

      def self.source_root
        ENV['MM_ROOT']
      end

      # Tell Thor to exit with a nonzero exit code on failure
      def self.exit_on_failure?
        true
      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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
middleman-presentation-0.15.8 lib/middleman-presentation/commands/style.rb
middleman-presentation-0.15.7 lib/middleman-presentation/commands/style.rb
middleman-presentation-0.15.6 lib/middleman-presentation/commands/style.rb
middleman-presentation-0.15.5 lib/middleman-presentation/commands/style.rb