1.0.0 • Published 8 years ago

modulepaths v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

modulepaths

A browserify transform to output the current module path in a comment at the top of the module definition. Useful for debugging without sourcemaps.

install

With npm do:

npm install modulepaths

then use -t modulepaths with the browserify command or use .transform('modulepaths') from the browserify api.

example

Here is what some bundled code will look like (this is in the middle of the bundle somewhere). Notice the // ===== FILE: comments (the paths are relative to where you run the browserify command):

// more bundle code above

},{"./some/path/b":3}],2:[function(require,module,exports){
// ===== FILE: ./d.js =====
module.exports = function() {
    console.log("stuff");
};

},{}],3:[function(require,module,exports){
// ===== FILE: ./some/path/b.js =====
var d = require('../../d');

module.exports = function() {
    d();
};

// more bundle code below

license

MIT