Allow the welcome message to replace the default one instead of just augment it.

This commit is contained in:
Chris Eppstein 2009-11-01 17:09:44 -08:00
parent 353a225ac5
commit d4f67a315c
2 changed files with 6 additions and 3 deletions

View File

@ -44,7 +44,7 @@ module Compass
end end
def finalize(options = {}) def finalize(options = {})
if options[:create] if options[:create] && !manifest.welcome_message_options[:replace]
puts <<-NEXTSTEPS puts <<-NEXTSTEPS
********************************************************************* *********************************************************************
@ -72,7 +72,7 @@ More Resources:
NEXTSTEPS NEXTSTEPS
end end
puts manifest.welcome_message if manifest.welcome_message puts manifest.welcome_message if manifest.welcome_message
if manifest.has_stylesheet? 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 "\nTo import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:"
puts stylesheet_links puts stylesheet_links
end end

View File

@ -48,9 +48,12 @@ module Compass
end end
end end
def welcome_message(value = nil) attr_reader :welcome_message_options
def welcome_message(value = nil, options = {})
if value if value
@welcome_message = value @welcome_message = value
@welcome_message_options = options
else else
@welcome_message @welcome_message
end end