Class: Compass::Installers::BareInstaller

Inherits:
Base
  • Object
show all
Defined in:
lib/compass/installers/bare_installer.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #target_path, #template_path, #working_path

Attributes included from Actions

#logger

Instance Method Summary collapse

Methods inherited from Base

#compilation_required?, #initialize, #install_directory, #install_html, #install_html_without_haml, #install_stylesheet, installer, #pattern_name_as_dir, #run, #stylesheet_links, #targetize, #templatize

Methods included from Actions

#basename, #copy, #directory, #log_action, #process_erb, #relativize, #remove, #separate, #strip_trailing_separator, #write_file

Constructor Details

This class inherits a constructor from Compass::Installers::Base

Instance Method Details

#completed_configurationObject



5
6
7
# File 'lib/compass/installers/bare_installer.rb', line 5

def completed_configuration
  nil
end

#config_contentsObject



22
23
24
25
26
27
# File 'lib/compass/installers/bare_installer.rb', line 22

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

#finalize(options = {}) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/compass/installers/bare_installer.rb', line 29

def finalize(options = {})
  puts <<-NEXTSTEPS

*********************************************************************
Congratulations! Your compass project has been created.

You may now add sass stylesheets to 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

#initObject



9
10
11
12
# File 'lib/compass/installers/bare_installer.rb', line 9

def init
  directory targetize("")
  directory targetize(Compass.configuration.sass_dir)
end

#installObject



17
18
19
20
# File 'lib/compass/installers/bare_installer.rb', line 17

def install
  config_file ||= targetize('config.rb')
  write_file config_file, config_contents
end

#prepareObject



14
15
# File 'lib/compass/installers/bare_installer.rb', line 14

def prepare
end