Raise an error when compiling selective files from a directory other than the project directory.

This commit is contained in:
Chris Eppstein 2011-04-01 09:00:33 -07:00
parent 0eef08e6ce
commit 3892919585

View File

@ -26,11 +26,15 @@ module Compass
end
def relative_stylesheet_name(sass_file)
sass_file[("#{from}/".length)..-1]
sass_file[(from.length + 1)..-1]
end
def stylesheet_name(sass_file)
sass_file.gsub(%r{#{from}/}, '')[0..-6]
if sass_file.index(from) == 0
sass_file[(from.length + 1)..-6]
else
raise Compass::Error, "You must compile individual stylesheets from the project directory."
end
end
def css_files