Class: Compass::AppIntegration::StandAlone::Installer
Instance Attribute Summary
#manifest
#options, #target_path, #template_path, #working_path
#logger
Instance Method Summary
collapse
#initialize, #install, #manifest_file, #stylesheet_links
#initialize, #install, #install_directory, #install_html, #install_html_without_haml, #install_stylesheet, installer, #pattern_name_as_dir, #run, #stylesheet_links, #targetize, #templatize
#basename, #copy, #directory, #log_action, #process_erb, #relativize, #remove, #separate, #strip_trailing_separator, #write_file
Instance Method Details
#compilation_required? ⇒ Boolean
77
78
79
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 77
def compilation_required?
@manifest.compile?
end
|
#completed_configuration ⇒ Object
38
39
40
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 38
def completed_configuration
nil
end
|
#config_contents ⇒ Object
27
28
29
30
31
32
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 27
def config_contents
project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil
Compass.configuration.serialize
ensure
Compass.configuration.project_path = project_path
end
|
#config_files_exist? ⇒ Boolean
23
24
25
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 23
def config_files_exist?
File.exists? targetize('config.rb')
end
|
#finalize(options = {}) ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 42
def finalize(options = {})
if options[:create] && !manifest.welcome_message_options[:replace]
puts <<-NEXTSTEPS
*********************************************************************
Congratulations! Your compass project has been created.
You may now add and edit sass stylesheets in the #{Compass.configuration.sass_dir} subdirectory of your project.
Sass files beginning with an underscore are called partials and won't be
compiled to CSS, but they can be imported into other sass stylesheets.
You can configure your project by editing the config.rb configuration file.
You must compile your sass stylesheets into CSS when they change.
This can be done in one of the following ways:
1. To compile on demand:
compass compile [path/to/project]
2. To monitor your project for changes and automatically recompile:
compass watch [path/to/project]
More Resources:
* Website: http://compass-style.org/
* Sass: http://sass-lang.com
* Community: http://groups.google.com/group/compass-users/
NEXTSTEPS
end
puts manifest.welcome_message if manifest.welcome_message
if manifest.has_stylesheet? && !manifest.welcome_message_options[:replace]
puts "\nTo import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:"
puts stylesheet_links
end
end
|
#init ⇒ Object
13
14
15
16
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 13
def init
directory targetize("")
super
end
|
#prepare ⇒ Object
34
35
36
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 34
def prepare
write_configuration_files unless config_files_exist? || !@manifest.generate_config?
end
|
#write_configuration_files(config_file = nil) ⇒ Object
18
19
20
21
|
# File 'lib/compass/app_integration/stand_alone/installer.rb', line 18
def write_configuration_files(config_file = nil)
config_file ||= targetize('config.rb')
write_file config_file, config_contents
end
|