gator icon indicating copy to clipboard operation
gator copied to clipboard

Proper UMD export and npm building

Open jasonkarns opened this issue 7 years ago • 1 comments

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.

jasonkarns avatar Dec 12 '17 16:12 jasonkarns

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

jasonkarns avatar Dec 12 '17 19:12 jasonkarns