nicolashery/umd-wrap — pull request #1 by 5310 (2014-09-03 13:42:02+00:00)
Title: Support dotted namespace support for global export alias.

Exported global alias should accept dot-notation for namespacing.

The option `exports: 'space.robot'` should be and result in the module being exposed to `window.space.robot`, or more specifically `window['space']['robot']`, instead of `window['space.robot']` which is the current behavior.

---

I use this package via [cjs-umd], wanting to convert a library I'm writing to global exports. Due to the organization of said library -- which is composed of many small optional NPM modules which don't pose a problem with `require`s but would be creating quite a mess in the global scope -- I felt the need to export the bundled modules under a namespace.

The only regression caused by allowing dot-notaion for the global export alias that modules which we previously exported with a period in their name would be moved to a nested reference. Since such export names could not be access directly in global scope or via dot notation anyway, and is quite _weird_ to say the least, I find that this regression is justifiable.

I would be very much obliged if this change was merged. And I also request that this package, along with a dependency updated [cjs-umd] is published onto NPM. I find the latter useful enough to be published alongside umd-wrap!

---

P.S. This is my first pull-request. Forgive me if I'm doing something wrong. For example: should I not have sent the updated `README.md` and `package.json`? If the change is deemed useful I'd refactor any faux-pas noted. :]

[cjs-umd]: https://github.com/nicolashery/cjs-umd