2

I want to make my own enhanced spin-off of one of the jQuery "helper" functions as a plugin (deferred.js/$.when() as it happens.)

Well actually I've already made it, but completely detached from any source code repository.

What I want to ask is since jQuery uses GitHub, and GitHub seems to promote forking projects, what is the best way to go about making my plugin in a way that I can eventually share with others or offer back to jQuery etc?

Should I fork the entire jQuery project and convert the one source file into a new plugin project?

I really don't know anything much about the Git/GitHub ways of doing things but it seems I can't just fork the one source file but need to fork the entire jQuery. If I'm making a plugin I won't be needing all the rest anyway.

Or should I just copy and paste the one source file without leaving a "paper trail" between my derived project and the original project?

(If this question belongs on programmers.SE instead I'm perfectly fine with migrating it. If the question is totally wrong for SO let me know if there's any way I can fix it since I think this is a topic that would be useful for others.)

4

1 回答 1

1

It sounds like this would be better suited as a standalone jQuery plugin, mostly because you can maintain your code separately from the main jQuery library. I would make it just another script to include after a user includes jQuery.js and set up my own github repo for it.

You're right, you can't just fork one file because forking is for branches, conceptually speaking.

Hope this helps

于 2012-08-26T14:45:18.370 回答