getify / JSON.minify

Simple minifier for JSON to remove comments and whitespace
http://web.archive.org/web/20100629021329/http://blog.getify.com/2010/06/json-comments/
410 stars 102 forks source link

Add support for require() with CommonJS #31

Closed PaulBGD closed 3 years ago

PaulBGD commented 8 years ago

Add supports to the JS version so we can use it with CommonJS.

pradyunsg commented 8 years ago

@PaulBGD Could you add a description?

getify commented 8 years ago

I think we should just have a separate branch for the AMD form of the lib, like we do for the node (CommonJS) form.

pradyunsg commented 8 years ago

Well, I think this is fine as it's a fairly trivial change. But I'm not really banking either way but would definitely prefer less branches.

getify commented 8 years ago

if we we're going to make this change, we should just change to the standard UMD wrapper and do away with having a separate node branch, since UMD works in AMD, CommonJS, and browser.

pradyunsg commented 8 years ago

Works with me.

We do away with the node branch and use the standard UMD wrapper (nodeAdapter?) in javascript branch and make a new node release (I say 1.0.1).

getify commented 8 years ago

+1