From 1343ce9e229731a58d321a20ecbf82be43b5397c Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Wed, 17 Dec 2014 17:12:29 -0500 Subject: [PATCH] let's get that sourcemap on our file object --- lib/compiler.coffee | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/compiler.coffee b/lib/compiler.coffee index a4d92414..46b330f6 100644 --- a/lib/compiler.coffee +++ b/lib/compiler.coffee @@ -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 @@ -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)