Compatibility with browserify

In a browserify package, `this` will refer to a node-style
exports object, not window. So just reference `window`
directly.
This commit is contained in:
John Firebaugh 2013-04-08 10:49:39 -04:00
parent 60a906a239
commit e6998948b1

View File

@ -117,7 +117,7 @@ exports.build = function (compsBase32, buildName) {
var copy = fs.readFileSync('src/copyright.js', 'utf8'),
intro = '(function (window, document, undefined) {',
outro = '}(this, document));',
outro = '}(window, document));',
newSrc = copy + intro + combineFiles(files) + outro,
pathPart = 'dist/leaflet' + (buildName ? '-' + buildName : ''),