azproduction / lmd

LMD - JavaScript Module-Assembler for building better web applications :warning: Project is no longer supported :warning:
http://azproduction.ru/lmd/
MIT License
449 stars 27 forks source link

Don't warn about 'sandbox' when 'bind' is empty #173

Closed leonidborisenko closed 10 years ago

leonidborisenko commented 10 years ago

Empty object as a value of bind module option will not produce any require() calls, but still is useful for modules exporting its stuff via setting of modules's this object properties.

For example, lazy.js does this. In the linked code, context is a parameter of IIFE creating whole code scope, so context is the this passed to IIFE, i.e. object that could be set by LMD's bind option.

As a sidenote: lazy.js tries also to use exports, but makes one wrong assumption, so it doesn't work with LMD.

azproduction commented 10 years ago

Thank you. I accept this PR and will refactor addExtra3partyDepends().