Skip to content

Commit

Permalink
Do not process if there is nothing to process
Browse files Browse the repository at this point in the history
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
kenhkan committed Oct 29, 2013
1 parent af059dd commit 64e9750
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/index.coffee
Expand Up @@ -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

Expand Down

0 comments on commit 64e9750

Please sign in to comment.