Skip to content

Commit

Permalink
after_do is no logner used
Browse files Browse the repository at this point in the history
  • Loading branch information
hungtatai committed Aug 25, 2014
1 parent 4037ef9 commit 6acf2dc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/hook/compass_patch.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

require 'after_do'
require 'pathname'

require 'compass/commands'

# expose listener
Expand Down Expand Up @@ -34,6 +32,14 @@ class Compass::Commands::WatchProject
@sass_compiler = m.bind(self).(*args, &block)
end

notify_watches = instance_method("notify_watches")
define_method("notify_watches") do |*args, &block|
notify_watches.bind(self).(*args, &block)
java.lang.System.gc()
end



end

# expose watches
Expand Down Expand Up @@ -116,8 +122,3 @@ class Sass::Plugin::Compiler
end

end

Compass::Commands::WatchProject.extend AfterDo
Compass::Commands::WatchProject.after :notify_watches do |modified, added, removed|
java.lang.System.gc()
end

0 comments on commit 6acf2dc

Please sign in to comment.