Bower: A package manager for the web, from Twitter
twitter.github.com
twitter.github.com
What I mean: if I'm just using jQuery and two or three other JavaScript libraries, downloading those manually isn't a big ordeal, they're single files, already minified for my convenience, available on a public CDN if I want to use that in production, they usually have no dependencies themselves and I'm only inclined to update them to newer version if something doesn't work, which is hardly ever. All of these things make package management for the server a godsend but package management for the client sort of... meh.
Ender, on the other hand (and for all its flaws) does a good job of explaining how you can use it to approach libraries for the client more like you'd approach them on the server: tiny packages that do one thing well and that don't reinvent the wheel but where applicable build on existing libraries. Now that sounds like something I can get behind.
Similarly, if you read TJ Holowaychuk's ideas on package management in the browser (linked to by kreutz below, or at http://tjholowaychuk.com/post/27984551477/components) then you start to get an idea of, yeah, maybe it'd be cool to have these packages that are little bundles of HTML, CSS and JavaScript and together they make up a single interface element or something of the sort -- included in your project as-needed. Fascinating.
Bower, by comparison, sounds like "a thing that downloads things for me." It might just be the copy (rather than the idea) and maybe it's the tool we need to do what someone like TJ envisions, but it's not clicking for me right now.
The reason why I am skeptical of new entrants into the javascript package management arena is that there is already a package manager with over 14k packages and a vibrant community that is producing packages at a very high rate: npm. npm might not be the best package manager as-is for browser development, but tools like browserify (disclaimer: I wrote browserify), ender, or many others can let your browser code use much of the value that has already been created for npm, even though npm is primarily about node.js packages. A surprising number of modules written for node will just work in tools like browserify.
Any upstart package systems would be wise to have a clear and simple path for unlocking the value created in the node community because there is too much value being created in npm to ignore. Whether that path involves adding fields to the package.json, tools to bridge the gap between package repositories, fancy in-browser trickery or compile steps remains an open question but it would be really pointless to require people to publish their modules that they've already put on npm to buy in to yet another package system, especially since there seems to be a new package manager every month lately.
and it DOES work with everything
... so long as you wrap all the files in the particular variant of define() function that works with requirejs (but not with other competing AMD function signatures). And then you might want to use some modules written for commonjs or node with `exports`, so you'll need a tool to transform those files. And then you'll probably want to compile the application into a single javascript bundle in production for performance.I'm not saying bower is any better in any of these respects, just that everything is terrible.
As for define(), there's only one AMD method signature: define([[name,] deps,] fn). Any loader that does not accept this signature cannot legitimately call itself an AMD loader.
* http://requirejs.org/docs/api.html#config-shim
To load a library that uses Node/CJS modules:
* https://github.com/requirejs/cajon#why
- or -
* https://github.com/linkedin/inject#writing-commonjs-complian... "clientDependencies": [...]
would be nice - most projects I work on these days already have a package.json file.The ./components path could be configurable too.
Something is wrong here.
$ bower lookup jquery
jquery git://github.com/components/jquery.git
Web link: https://github.com/component/jquerySince there's no authentication, the bower jquery package will always point to this url, which is not officially associated with jquery.
Link?
http://news.ycombinator.com/item?id=4487221
Also of note: the algorithm to check URL was already submitted is easily fooled.
https://github.com/component/component
https://github.com/component/spec/wiki
Bower seems like a blatant ripoff. Twitter Engineering doesn't even mention the component project or spec on the Bower page at all...
> Bower is a lower level component then Jam, Volo, or Ender. These managers could consume Bower as a dependency.
I think it is actually an approach that is more useful and makes more sense than Volo, Components etc. because of it's low-levelness.
It sure feels like Twitter is avoiding giving credit where credit is due. No links to the component.json spec or any mention of TJ Holowaychuk's component feels smarmy to me.
I looked at the source and found that the initial public commit contains 79 files.
In other words, the build failing is not ideal; but don't get too hung up on it right now.
Twitter, in addition to being a genuinely interesting social phenomenon, has always posed technical challenges that were sufficiently interesting to attract some top-notch people. Give them the respect of judging them by their technical work, and not their employer's latest unpopular business decision.