Ruby: Custom file_exists Sass Function
module Sass::Script::Functions | |
def file_exists(image_file) | |
path = Dir.getwd + "/" + image_file.value | |
Sass::Script::Bool.new(File.exists?(path)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment