domenic / browserify-deoptimizer

Transforms browserify bundles into a collection of single files
Do What The F*ck You Want To Public License
26 stars 0 forks source link

Why am I using cwd? #1

Closed domenic closed 11 years ago

domenic commented 11 years ago

Should it be an option what directory module IDs are resolved relative to, or...?

thlorenz commented 11 years ago

+1 so I don't have to do this anymore:

// trick deoptimizer into thinking we are somewhere else
var orig_process_cwd = process.cwd;
process.cwd = function () { return path.join(__dirname, '../../../../../'); }

var deoptimized = deoptimize(bundle);

process.cwd = orig_process_cwd;
thlorenz commented 11 years ago

Cool, thanks.