global-modulename
v0.1.1
Published
a transform for browserify which allows the replacement of a new global, '__modulename' with the name of the (sub)module within which it is defined
Downloads
5
Maintainers
Readme
global-modulename
Transform that allows for a new statically-compiled global: __modulename
.
This global is resolved to the name of the containing (sub)module.
Mostly this will resolve to the basename of the containing file with the extension stripped off, unless the file is named index.*
, in which case the name of the parent directory is used.
Installation
Usage
browserify -t global-modulename entry.js > bundle.js