WebWorldWind/tools/wrap.start
Miguel Del Castillo 3c2ce6d4fe Added CommonJS-like interface to almond wrapper. (#155)
- This changes the build artifact generation so it has a UMD interface.
   http://davidbcalhoun.com/2014/what-is-amd-commonjs-and-umd/

 - Build artifacts should now be capable of working like a Node modules
   (as an npm package with a bundler like Webpack or Browserify for
   frontend development), in addition to the previous interfaces
   (an AMD module or web browser object attached to the window object).
2017-06-30 14:49:44 -07:00

14 lines
339 B
Plaintext
Executable File

(function (root, factory) {
if (typeof exports === "object") {
// CommonJS-like
module.exports = factory();
} else if (typeof define === 'function' && define.amd) {
// AMD.
define([], factory);
} else {
// Browser globals
root.WorldWind = factory();
}
}(this, function () {