Skip to content

Instantly share code, notes, and snippets.

@catsAND
Created April 7, 2020 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catsAND/76db474ddb539f2b7484cbfcdad94f11 to your computer and use it in GitHub Desktop.
Save catsAND/76db474ddb539f2b7484cbfcdad94f11 to your computer and use it in GitHub Desktop.
Sass mtime custom function
unless defined?(Sass)
require 'sass'
end
module Sass::Script::Functions
def mtime(path)
t = File.mtime(path.value)
return Sass::Script::String.new("#{t.to_i}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment