Skip to content

Commit

Permalink
Relative default prelude path in source maps
Browse files Browse the repository at this point in the history
  • Loading branch information
zertosh committed Sep 27, 2014
1 parent 718fb97 commit 6faaf1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var JSONStream = require('JSONStream');
var defined = require('defined');
var through = require('through2');
var umd = require('umd');

Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 6faaf1e

Please sign in to comment.