Permalink
Browse files

Do not process if there is nothing to process

Because jade-angularjs-brunch builds destructively, if there is no change in the templates the second time around, jade-angular-brunch would replace the content of the built file with nothing
  • Loading branch information...
1 parent af059dd commit 64e9750cd61f3f8728a1e3a4e553a414130051fe @kenhkan kenhkan committed Oct 29, 2013
Showing with 11 additions and 5 deletions.
  1. +8 −5 lib/index.js
  2. +3 −0 src/index.coffee
View
Oops, something went wrong.
View
@@ -165,6 +165,9 @@ module.exports = class JadeAngularJsCompiler
onCompile: (compiled) ->
preResult = @prepareResult compiled
+ # Need to stop processing if there's nothing to process
+ return if preResult.length is 0
+
assets = _.filter preResult, (v) => @staticMask.test v.path
assetsTree = @parsePairsIntoAssetsTree assets

0 comments on commit 64e9750

Please sign in to comment.