
Show HN: Umbrella JS, a 2kb jquery alternative - franciscop
http://umbrellajs.com/
======
franciscop
OP here, I created this for fun then it started growing and now I released it
in case anyone want to play with it, I hope you like it. It's not a clone of
jquery so it's not exactly like Zepto.js.

I specially love the build system I made with grunt, so each new function is
just a folder in /src/plugins and it includes the "documentation.md" and
"test.js" automagically.

PS, yes, it has bugs and it's probably not production-ready. However I would
love as much feedback as possible. Of course ask me anything you want (:

~~~
andreasklinger
unsure if relevant to you - but you might be able to show the documentation.md
in the github directory view worstcase by renaming it to readme.md

~~~
franciscop
Hey thanks for the tip, I preferred to show a "Getting Started" and general
information instead of the library documentation itself in the readme, I think
it made more sense.

~~~
ChristianBundy
GitHub actually shows a README file for each directory (if one exists), so the
recommendation was to change /src/plugins/x/documentation.md to
/src/plugins/x/README.md so that you could see the documentation on this page:
[https://github.com/umbrellajs/umbrella/tree/master/src/plugi...](https://github.com/umbrellajs/umbrella/tree/master/src/plugins/after)

~~~
franciscop
wow this is great! Thanks for the tip, I'll do it for sure

------
johnhenry
I like it! Since it's a jQuery alternative, I wonder if you've considered
having the global name default to "$" rather than "u"?

~~~
franciscop
It was somewhere in the documentation but I took that off deliberately since
it's not really 100% compatible, so it'd just confuse people long-term.

> Edit: HN killed all the fun, I am refering to this character:
> [http://www.fileformat.info/info/unicode/char/2602/index.htm](http://www.fileformat.info/info/unicode/char/2602/index.htm)

Funny enough, the name actually comes from the fact that unicode characters
are accepted. First it was just a wrapper for document.querySelector(), and
looking for a single character for the name I found out that this could be
used:

    
    
        [umbrellachar]('.demo')
    

Of course in the end I decided against it, but for some time the official name
of the library/function was just that character.

------
huskyr
Nice. There seems to be a resurgence of jQuery alternatives, see also Lea
Verou's Bliss: [http://blissfuljs.com/](http://blissfuljs.com/)

~~~
franciscop
I didn't know of that, I'll surely try to contribute, thanks! (:

------
pram
wow your page uses an incredible amount of resources lol

[http://i.imgur.com/I9zeKxm.png](http://i.imgur.com/I9zeKxm.png)

~~~
franciscop
I don't know why, I know that the rain/cloud animation is really CPU-intensive
so it might be cached? Do you mind testing the same for /documentation where
there's no animation, please?

~~~
HCIdivision17
I got about 20,000K for that page. The animated page does seem to climb a bit,
but now that I've reloaded the page, it doesn't seem to be that high, sticking
around 21,000K. So... maybe it just wasn't releasing all the memory as fast or
something in Chrome?

------
GordonS
Note that it's 2kb _when gzipped_ \- but that is still a fraction of the size
of jQuery when gzipped.

~~~
franciscop
Sure, but what developer slightly concerned about website weight doesn't gzip
them? (:

------
coppolaemilio
What is the current browser support?

~~~
franciscop
I test it regularly in IE11, Firefox and Chrome (last two in desktop and
mobile). It might work in older IE versions, but it's not a goal since IE10
share is 0.85%, IE9 is 0.88% and IE8 is 1.15%, all of them decreasing month by
month [1].

However it supports mobile much better since it'll load super-fast (:

[1] [http://gs.statcounter.com/#desktop+mobile+tablet-
browser_ver...](http://gs.statcounter.com/#desktop+mobile+tablet-
browser_version_partially_combined-ww-monthly-201412-201512)

