Class: Middleman::Presentation::Cli::List

Inherits:
Base
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/middleman-presentation-core/cli/list.rb

Overview

This class provides an ‘presentation init’ command for the middleman CLI.

Instance Method Summary collapse

Methods inherited from Base

#help, subcommand_help

Methods included from Shared

#assets_loader, #bower_path, #enable_debug_mode, included, #open_in_editor

Instance Method Details

#assetsObject



28
29
30
31
32
33
34
# File 'lib/middleman-presentation-core/cli/list.rb', line 28

def assets
  enable_debug_mode
  load_runtime_assets

  puts Middleman::Presentation.t('views.assets.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.assets_manager.to_s
end

#componentsObject



37
38
39
40
41
42
43
# File 'lib/middleman-presentation-core/cli/list.rb', line 37

def components
  enable_debug_mode
  load_runtime_assets

  puts Middleman::Presentation.t('views.components.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.components_manager.to_s
end

#helpersObject



19
20
21
22
23
24
25
# File 'lib/middleman-presentation-core/cli/list.rb', line 19

def helpers
  enable_debug_mode
  load_runtime_assets

  puts Middleman::Presentation.t('views.helpers.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.helpers_manager.to_s
end

#pluginsObject



10
11
12
13
14
15
16
# File 'lib/middleman-presentation-core/cli/list.rb', line 10

def plugins
  enable_debug_mode
  load_runtime_assets

  puts Middleman::Presentation.t('views.plugins.list.headline').underline(character: Middleman::Presentation.underline_character)
  puts Middleman::Presentation.plugins_manager.to_s
end

#stylesObject



46
47
48
49
50
51
52
53
54
55
# File 'lib/middleman-presentation-core/cli/list.rb', line 46

def styles
  enable_debug_mode
  load_runtime_assets

  css_classes = Middleman::Presentation::CssClassExtracter.new.extract Middleman::Presentation.stylable_files, ignore: %w(slides reveal)

  puts Middleman::Presentation.t('views.styles.list.headline').underline(character: Middleman::Presentation.underline_character)
  css_classes.each { |klass| puts format '  %20s: %s', klass.name, klass.files.to_list }
  puts
end