-
Notifications
You must be signed in to change notification settings - Fork 101
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
Plugins catalog #125
Comments
This feels somewhat related to @LeaVerou's earlier issue here: h5bp/lazyweb-requests#178 That issue resulted in eg: http://youmightnotneedjqueryplugins.com/ Another vanilla-js plugin site that was mentioned there was: http://microjs.com/ For most things those sites would probably serve the purpose well. Perhaps there's a use case for some Bliss-specific things as well, but since the purpose of Bliss is to make vanilla js-simpler it feels weird to make non-vanilla js plugins that only work with Bliss and if the plugins are vanilla then those existing sites and the references issue would solve this fairly well I think. |
One thing i really like about bliss is that it adds functions that are as convenient as prototype extensions but yet much less intrusive by defining plugins / extensions to bliss could be as simple as a way to define "my string"._.capitalize();
// My String then there could be a bliss extension libs organized by object type, |
That’s a great idea @dperrymorrow! Love it!! |
In general, we should have a list of “official” plugins, like we do in Prism. These end up getting more contributions from the community so are more polished than random plugins people post on their website or StackOverflow. |
+1 for the Plugins page. Just having it on Github would be a good start. And like @dperrymorrow the win is to have plugins accessible via. Also a short boilerplate example of writing a plugin using |
Short example I actually have in my current Bliss-powered work project: // Add or remove a CSS class based on whether the second param is truthy or falsy.
$.add("toggleClass", function(className, addIf) {
this.classList[addIf? "add" : "remove"](className);
});
// Provide shortcuts to long property chains in class definitions
$.proxy = $.classProps.proxy = $.overload(function(obj, property, proxy) {
Object.defineProperty(obj, property, {
get: function() {
return this[proxy][property];
},
configurable: true,
enumerable: true
});
return obj;
}); |
@LeaVerou Thanks, very helpful. However |
@dperrymorrow could you please add some documentation for |
sure thing @LeaVerou will try to get to that today. |
added documentation, |
Fantastic, thanks!! It might be good to have 2 keys in the object example. |
I'd be nice to have some sort of plugins catalog, so users interested would easly find useful stuff to use with Bliss. Switching from jQuery to anything-else requires rewriting a lof of stuff, cause most ready-to-use-browser-stuff-in-javascript requires jQuery to work (I'm rewriting UI in my CMS with Bliss, but I still have to load jQuery, cause of all those plugins).
And with "plugins" I don't mean only some kind of sliders, lightboxes or other-big-things, but also small methods, like the one I wrote yesterday - to temporarily disable the whole form, remembering which inputs was disabled before disabling the form (so they stay disabled after re-enabling the form).
The text was updated successfully, but these errors were encountered: