Skip to content

Commit

Permalink
let's get that sourcemap on our file object
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Escalante committed Dec 17, 2014
1 parent a218ecc commit 1343ce9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/compiler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,11 @@ class CompilePass
.with(@)
.tap(=> @opts = configure_options.call(@))
.then(compile_or_pass)
.then((o) => @content = o)
.then(=> sequence(hooks('compile_hooks.after_pass'), @))
.then(=> @content)
.then (o) =>
@content = o.result
@sourcemap = o.sourcemap
return @content
.tap(=> sequence(hooks('compile_hooks.after_pass'), @))

###*
* This function is responsible for getting all the options together for the
Expand Down Expand Up @@ -345,5 +347,5 @@ class CompilePass
###

compile_or_pass = ->
if not @adapter.name then return @content
@adapter.render(@content, @opts).then((r) -> r.result)
if not @adapter.name then return { result: @content }
@adapter.render(@content, @opts)

0 comments on commit 1343ce9

Please sign in to comment.