[Pkg-javascript-commits] [node-browser-pack] 101/141: Relative default prelude path in source maps
Bastien Roucariès
rouca at moszumanska.debian.org
Thu May 4 10:23:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-browser-pack.
commit 6faaf1e3bfa0470de2ef471628483eb3daae6dfe
Author: Andres Suarez <zertosh at gmail.com>
Date: Sat Sep 27 18:33:00 2014 -0400
Relative default prelude path in source maps
---
index.js | 4 +++-
package.json | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
index a076949..8d2af21 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,5 @@
var JSONStream = require('JSONStream');
+var defined = require('defined');
var through = require('through2');
var umd = require('umd');
@@ -30,8 +31,9 @@ module.exports = function (opts) {
var first = true;
var entries = [];
+ var basedir = defined(opts.basedir, process.cwd());
var prelude = opts.prelude || defaultPrelude;
- var preludePath = opts.preludePath || defaultPreludePath;
+ var preludePath = opts.preludePath || path.relative(basedir, defaultPreludePath);
var lineno = 1 + newlinesIn(prelude);
var sourcemap;
diff --git a/package.json b/package.json
index 49c8120..a711327 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"JSONStream": "~0.8.4",
"combine-source-map": "~0.3.0",
"concat-stream": "~1.4.1",
+ "defined": "~0.0.0",
"through2": "~0.5.1",
"umd": "^2.1.0"
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-browser-pack.git
More information about the Pkg-javascript-commits
mailing list