Skip to content

Commit

Permalink
Resolve relative path to external bundle when passing to consolify
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyreeves authored and Jonny Reeves committed Jul 14, 2016
1 parent b74bf9e commit af8a55d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/consolify.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
var fs = require('fs');
var through = require('through2');
var consolify = require('consolify');
var path = require('path');

function resolveRelativeBundlePath(bundle, target) {
var bundleDir = path.dirname(bundle);
var targetDir = path.dirname(target);
return path.join(path.relative(bundleDir, targetDir), path.basename(bundle));
}

module.exports = function (b, opts) {
consolify(b, {
bundle: opts.bundle
bundle: resolveRelativeBundlePath(opts.bundle, opts.consolify)
});

function apply() {
Expand Down

0 comments on commit af8a55d

Please sign in to comment.