From de07c4b8cacb4bb119739e32bbfa9ceefceb6347 Mon Sep 17 00:00:00 2001 From: David Tilchin Date: Wed, 19 Mar 2014 21:48:41 -0700 Subject: [PATCH] Fixes allowing source mapping to work - filename is a required option to compile() - Parens around a ternary, since ('name' + false ? '' : '.coffee') evaluates to '', not 'name.coffee' --- cs.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cs.js b/cs.js index 8b78320..79e2aac 100644 --- a/cs.js +++ b/cs.js @@ -277,8 +277,9 @@ define(['coffee-script'], function (CoffeeScript) { opts.sourceMap = true; opts.header = true; opts.inline = true; - opts.sourceFiles = [name + opts.literate ? '' : '.coffee']; - opts.generatedFile = name + opts.literate ? '' : '.coffee'; + opts.filename = fullName; + opts.sourceFiles = [name + (opts.literate ? '' : '.coffee')]; + opts.generatedFile = name + (opts.literate ? '' : '.coffee'); var compiled; //Do CoffeeScript transform.