justmoon / node-extend

Simple function to extend objects
MIT License
341 stars 68 forks source link

Add component.json for browser support. #17

Closed andyburke closed 10 years ago

ljharb commented 10 years ago

I'm really not a fan of adding things like this - node-extend already works in the browser - you can easily install it from npm and wrap it with browserify.

Basically, this adds maintenance overhead to every release, to support a minority use case. Can you elaborate on why this is necessary?

andyburke commented 10 years ago

Unfortunately, not everyone uses browserify.

The overhead to update a version number seems pretty low to add support for letting at least a small community use the module in the browser.

ljharb commented 10 years ago
<script>var module = {exports: {}};</script>
<script src="node-extend.js"></script>
<script>var extend = module.exports; module.exports = {};</script>

in the meantime.

We'll still consider this, but I'm really not inclined to support a workflow that's not browserify in 2014 :-/

andyburke commented 10 years ago

Your example for including it in a webpage is not really how things are done with component. Or really with any browser-oriented require framework I know of.

I get it that you don't want to include another file and have to bump another version string.

I will continue to use my fork to be able to use your module with component. I sent the PR because I don't like to just fork a repo without giving someone the opportunity to decide if my changes are something they want to merge back. If supporting component isn't something you want to do, go ahead and close this issue.

andyburke commented 10 years ago

Going to close this in preference to #18