10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/generators/view_primitives/list/list_generator.rb', line 10
def list_components
say "\nViewPrimitives components:\n\n", :bold
say "COMPONENT STATUS"
say "-" * 32
Components.supported.each do |component|
status = Components.installed?(component, destination_root) ? "installed" : "—"
color = (status == "installed") ? :green : :cyan
say format("%-18s %s", component, status), color
end
say "\nInstall: rails g view_primitives:add <name>", :cyan
say "Update: rails g view_primitives:update", :cyan
say "Themes: rails g view_primitives:theme rose\n", :cyan
end
|