eduardolundgren / gulp-umd

Gulp plugin for build JavaScript files as Universal Module Definition, aka UMD
MIT License
126 stars 14 forks source link

Ability to use custom names in namespaces #12

Open gobwas opened 9 years ago

gobwas commented 9 years ago

This brings something like this:

// root registering for namespace "my-app.my.super.namespace.module"
var _root = root;
_root = (_root["my-app"] = _root["my-app"] || {});
_root = (_root["my"] = _root["my"] || {});
_root = (_root["super"] = _root["super"] || {});
_root = (_root["namepsace"] = _root["namepsace] || {});
_root["module"] = factory(...);

Before this patch, you couldnt use the dash - symbol )