We waited for ages for MooTools prime to come out and to get adopted and for web builds to show up and to become more MooTools-y. And then, we thought (me and the Grookedge who’s also a MooTools fanboi):
Image may be NSFW.
Clik here to view.
So primish was born. Primish is just like a fork of prime that works in a browser. Out of the box.. With AMD loaders (RequireJS, almond etc). Or without (yeah, pesky global exports). It still works in node.js as an npm module – npm install primish
.
It also does a few things differently to prime and tries to be more MooTools 1.x-ish. Eg. emitter
AND options
mixins as standard. The options
mixin knows of emitter
and does the onEventname
sugar for you. implement
as standard as method or mutator key! .parent(‘methodname’, args)
as standard. Emitter events support pseudos as standard, eg this.on(‘load:once’, fn)
. Multiple events to same callback can be added on a single line this.collection.on(‘change add remove’, this.render)
.
That’s the sort of thing we were thinking. But just read the docs page, play with the live examples and have fun. It does not try to be a library and shim / do things to Types etc. It does Class and that’s it. For everything else, there is lodash.
Oh yes, and bower support, thanks to that Simon Smith guy that is a regular on JavaScript Daily. bower install primish
will add just the 3 .js files you may use. No extra baggage, you won’t download the web when you init your bower!
One more time. The link is here.
Chances are, Kamicane, Arian and Kentaromiura will knock something amazing up with prime. Until then, primish all the things.