mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fixes #2766 -- incompatible line number API
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
header = "Generated by CoffeeScript " + this.VERSION;
|
||||
js = "// " + header + "\n" + js;
|
||||
}
|
||||
if (options.sourceMap || options.returnObject) {
|
||||
if (options.sourceMap) {
|
||||
answer = {
|
||||
js: js
|
||||
};
|
||||
|
||||
@@ -169,8 +169,11 @@
|
||||
return compileJoin();
|
||||
} else {
|
||||
compiled = CoffeeScript.compile(t.input, t.options);
|
||||
t.output = compiled.js;
|
||||
t.sourceMap = compiled.v3SourceMap;
|
||||
t.output = compiled;
|
||||
if (o.sourceMap) {
|
||||
t.output = compiled.js;
|
||||
t.sourceMap = compiled.v3SourceMap;
|
||||
}
|
||||
CoffeeScript.emit('success', task);
|
||||
if (o.print) {
|
||||
return printLine(t.output.trim());
|
||||
@@ -476,8 +479,7 @@
|
||||
literate: helpers.isLiterate(filename),
|
||||
bare: opts.bare,
|
||||
header: opts.compile,
|
||||
sourceMap: opts.map,
|
||||
returnObject: true
|
||||
sourceMap: opts.map
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user