3 ms·
Ask HN: Requirejs vs Google Closure For Javascript Dependency Management
I tend to lean towards requirejs because there is great tooling ( see my project agilejs to see several tools composed together forming a useful toolkit: http://github.com/davidjnelson/agilejs ) and a lot of libraries and components seem to be supporting AMD these days.
I know google internally uses closure for dependency management. There are tools like plovr which are a step in the right direction.
Anyone have experience with both and can share pros/cons?
My use case ( which I'm sure others share ) is writing clean, componentized JavaScript which enables simple tdd and ci without reinventing the wheel for each new project, requiring manual setup steps, or requiring lists of JavaScript source files ( or worse, duplicated lists ).
Thanks :-)
- kls 14y agoI would personally use require, it has more momentum and is in more widespread use. While that is not the only reason you should select a tool, in the case of require it translates into more people ensuring that all of the third parts js libraries work with it. The biggest advantage for closure is the minification tool and require can use it.
- davidjnelson 14y agoThanks. I wasn't talking about closure compiler. I was talking about closure dependency management, ie: provides(), require(). I use closure _compiler_ already in agilejs.