Open jasonkarns opened 6 years ago
Replaces #27. #27 just adds a guard to the window assign. This PR, instead, exposes gator as proper first class CJS module. and builds a distributable using the universal module format: UMD (and does so as part of build, rather than manually including the boilerplate into source)
Also fixes #22
Source is a proper CommonJS module. UMD utility generates the wrapping UMD wrapper and is uglified. Both of these steps are done via npm's
prepare
step, which is run automatically during the pack/publish lifecycle and during bare installs (ie, when installed as a git-dep). Sourcemap is also generated to accompany the uglified output. The built assets are ignored from git (generated assets shouldn't be version controlled). Npm is instructed to include the appropriate built assets in the package tarball. Package-lock is added as per npm5.