Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic pattern breaks chainability #18

Closed
yckart opened this issue Nov 24, 2012 · 7 comments
Closed

Basic pattern breaks chainability #18

yckart opened this issue Nov 24, 2012 · 7 comments

Comments

@yckart
Copy link
Contributor

yckart commented Nov 24, 2012

Is it a good practice to break the second plugin instance if we call it like this?

$(selector).defaultPluginName({
    start: 13,
    end: 37
}).defaultPluginName({
    start: 37,
    end: 42
});

It will not work since we allow the plugin only to be instantiated once per element. But to remove the if statement in our plugin definition is even not the best idea, or?

@addyosmani
Copy link
Member

Let's explore if we can come up with a cleaner way of handling this. @zenorocha what do you think about the lightweight start in this repo? Is it different enough from the jQuery boilerplate for us to continue keeping in place or should we try to refactor it further?

@zenorocha
Copy link
Member

They are very similar, so I think it's better to refactor or remove the lightweight start from here and maintain the other one. Since you already made a reference for jQuery Boilerplate in README I think that will not be a problem.

@addyosmani
Copy link
Member

I agree with removing it. Do you think it's worth documenting the jQuery Boilerplate better in the chapter in my book as a replacement to the lightweight start too? It might help get a few more folks looking at it as well.

@zenorocha
Copy link
Member

Yeah, that would be nice!

@addyosmani
Copy link
Member

@zenorocha how should we do this? submodule the main boilerplate or just link to it from the readme?

@zenorocha
Copy link
Member

Just link, since the boilerplate repository has a different structure of patterns repository.

@yckart
Copy link
Contributor Author

yckart commented Jan 28, 2013

Yap, i agree with @zenorocha, providing just a link in the README seems to be the most logical way.

@yckart yckart closed this as completed Jan 28, 2013
@yckart yckart reopened this Jan 28, 2013
@yckart yckart closed this as completed Jan 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants