15 comments

[ 0.17 ms ] story [ 50.3 ms ] thread
(comment deleted)
I need some context for this. Google isn't helping with a term like "component". I see the install command itself is "component". I'm not familiar with this. What am I looking at? I would like to understand. Thanks!
Client-side development currently suffers from a lack of structure, more importantly this lack of structure and fundamental sharing of assets makes it difficult to abstract libraries into smaller subsets. Normally you would think twice about separating your library into several parts, because telling end-users to install several pieces is tedious, error-prone, and frankly annoying. Component makes this extremely easy, and we may all benefit from creating smaller lego-blocks for the web.

https://github.com/component/component/wiki/F.A.Q

Ah, the project link was what I needed. Thank you. Things are evolving rapidly on the front-end these days!
Thanks. This should have been mentioned in the Viewport.js github page, but there is absolutely no reference to it.
My bad... I added a reference to Component in README file.
Just wanted to say. Thank you for supporting Opera too. It simply looks nice to have inclusive development taking place in the web.
I've got a brilliant idea. How about we stop assuming that only Linux users browse HN or github! Some of us can't simply "$ component install". And it's a .js file... why is there an "installation" to begin with?
tl;dr The Viewport is a componente to ease viewport management. You can get the dimensions of the viewport and beyond, which can be quite helpful to perform some checks with JavaScript.
It is bizarre to need node.js to install a Javascript component.
Any chance you could provide an actual Viewport.js file for people who don't want to set up a full Nodejs env just to get this?