From 95259b6d88777baa05f9dd3e61ebba7091b3e635 Mon Sep 17 00:00:00 2001 From: Vladislav Botvin Date: Tue, 10 Nov 2015 17:28:16 +0300 Subject: [PATCH] Ability show sources via node-inspector --- lib/node.js | 5 +++-- src/node.ls | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node.js b/lib/node.js index 541b9b0a6..6a12feb9a 100644 --- a/lib/node.js +++ b/lib/node.js @@ -39,8 +39,9 @@ module.exports = function(LiveScript){ var js, e; js = LiveScript.compile(fs.readFileSync(filename, 'utf8'), { filename: filename, - bare: true - }); + bare: true, + map: "embedded" + }).code; try { return module._compile(js, filename); } catch (e$) { diff --git a/src/node.ls b/src/node.ls index 2b322258b..dd6626a0d 100644 --- a/src/node.ls +++ b/src/node.ls @@ -29,7 +29,7 @@ module.exports = !(LiveScript) -> LiveScript <<<< events.EventEmitter.prototype require.extensions.'.ls' = (module, filename) -> - js = LiveScript.compile (fs.read-file-sync filename, 'utf8'), {filename, +bare} + js = LiveScript.compile (fs.read-file-sync filename, 'utf8'), {filename, +bare, map: "embedded"} .code try module._compile js, filename catch