Class: Styleyt::PreviewGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
StyleytHelper
Defined in:
lib/generators/styleyt/preview_generator.rb

Constant Summary collapse

PARTIALS_DIR =
'partials/'
COMPILED_DIR_REL =
'../preview/compiled/'

Constants included from StyleytHelper

StyleytHelper::COMPILED_PREVIEW_DIRECTORY, StyleytHelper::HAML_FILES, StyleytHelper::PREVIEW_DIRECTORY, StyleytHelper::SASS_FILES, StyleytHelper::SASS_TEMPLATES_DIRECTORY

Class Method Summary collapse

Instance Method Summary collapse

Methods included from StyleytHelper

#ask_for_theme, #available_themes, #remove_file_suffix, #src_root_dir, #theme_directory

Class Method Details

.source_rootObject



14
15
16
# File 'lib/generators/styleyt/preview_generator.rb', line 14

def self.source_root
  File.join(File.dirname(__FILE__), COMPILED_PREVIEW_DIRECTORY)
end

Instance Method Details

#installObject



19
20
21
22
# File 'lib/generators/styleyt/preview_generator.rb', line 19

def install
  theme = ask_for_theme
  generate_preview(theme)
end