Permalink
Browse files

add fireapp_before_build & fireapp_after_build callback

config.rb example:

fireapp_before_build = lambda { |build_path|
  App.alert "Before buepp_before_buildld: #{build_path}"
}

fireapp_after_build = lambda { |build_path|
  App.alert "after build: #{build_path}"
}
  • Loading branch information...
1 parent 07d570d commit 265ef8ac05e8493ef0ac8bdd82d420eff4ccb04d @tka tka committed Feb 2, 2014
Showing with 13 additions and 1 deletion.
  1. +9 −0 src/compass_patch.rb
  2. +4 −1 src/project_builder.rb
View
@@ -53,13 +53,22 @@ def self.strip_trailing_separator(*args)
Configuration.add_configuration_property(:fireapp_minifyjs_on_build, nil) do
false
end
+
Configuration.add_configuration_property(:fireapp_always_report_on_build, nil) do
true
end
+
Configuration.add_configuration_property(:fireapp_disable_linecomments_and_debuginfo_on_build, nil) do
true
end
+ Configuration.add_configuration_property(:fireapp_before_build, nil) do
+ nil
+ end
+
+ Configuration.add_configuration_property(:fireapp_after_build, nil) do
+ nil
+ end
# default sass_options is nil
Configuration.add_configuration_property(:sass_options, nil) do
View
@@ -1,4 +1,3 @@
-
require 'tilt'
class ProjectBuilder
@@ -163,6 +162,8 @@ def build_static_file(release_dir, blacklist)
def build(build_path)
+ Compass.configuration.fireapp_before_build.call(build_path) if Compass.configuration.fireapp_before_build
+
Tray.instance.stop_livereload
Tray.instance.stop_watcher
@@ -179,6 +180,8 @@ def build(build_path)
yield msg
end
+ Compass.configuration.fireapp_after_build.call(build_path) if Compass.configuration.fireapp_after_build
+
Tray.instance.rewatch
return release_dir

0 comments on commit 265ef8a

Please sign in to comment.