Raise an error when compiling selective files from a directory other than the project directory.
This commit is contained in:
parent
0eef08e6ce
commit
3892919585
@ -26,11 +26,15 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
def relative_stylesheet_name(sass_file)
|
def relative_stylesheet_name(sass_file)
|
||||||
sass_file[("#{from}/".length)..-1]
|
sass_file[(from.length + 1)..-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
def stylesheet_name(sass_file)
|
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
|
end
|
||||||
|
|
||||||
def css_files
|
def css_files
|
||||||
|
Loading…
Reference in New Issue
Block a user