jspos icon indicating copy to clipboard operation
jspos copied to clipboard

UMD / npm packaging

Open konsumer opened this issue 13 years ago • 0 comments

I would like to see this library wrapped in UMD code, so it works in CommonJS (node, rhino, etc) and AMD (require.js, curl, etc) with a fallback of window global. This way it can stay name-spaced properly in browser with require.js, and be usable in node/rhino, and in worse-case work the same as it does.

this should do the trick.

I'd also like to add a package.json, and submit it to npm, so it's super-easy to install in node.

I have made a fork, and would be willing to make the change and do a pull-request.

konsumer avatar Sep 19 '12 15:09 konsumer