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
def finalize(options = {})
if options[:create]
if options[:create] && !manifest.welcome_message_options[:replace]
puts <<-NEXTSTEPS
*********************************************************************
@ -72,7 +72,7 @@ More Resources:
NEXTSTEPS
end
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 stylesheet_links
end

View File

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