Created
April 14, 2011 12:20
-
-
Save devboy/919357 to your computer and use it in GitHub Desktop.
This should be the shortest way to discover if an as3/mxml project should be recompiled or not ;)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def needed?(sources, target, dependencies) | |
return true unless File.exist?(@project.get_as3_output) | |
Dir.glob(FileList[sources,dependencies].to_a.collect{ |file| file += "**/*" } ). | |
map{|file| File.stat(file).mtime}.max > File.stat(@project.get_as3_output).mtime | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment