What is the recommended manifest JSON format for Bower packages?
bower, json, yeoman
Solution
Bower doesn't need a `bower.json` or a `component.json` to install packages. The manifest file provide some useful info, like dependencies, ignored files, version and etc, but in the end it just downloads Git commits and place them somewhere. In the case of Modernizr/Require.js, someone just registered their repos and Bower is retrieving a tag.
About the `.bower.json` file: this is generated by Bower itself after installing a package. It contains some more verbose info about a package, like the commit from which the package was retrieved, for example.
TL;DR: Keep using `bower init`, it'll do the right thing for you!
Problem
Using the `$ bower init` command, I have created a `bower.json` for my package and registered it with Bower, no problem. After looking at the Github homepages for some popular Bower packages, e.g. RequireJS and Modernizr, I've noticed their repo's don't contain a `bower.json` or a `component.json`. How is this possible? I've also noticed that when I download any Bower package, the package contains a `.bower.json` file (note the dot in the beginning) and that file contains quite a bit more information than what I was asked during `$ bower init` for my package. For example, below is the `.bower.json` from Modernizr: ``` { "name": "modernizr", "homepage": "https://github.com/Modernizr/Modernizr", "version": "2.6.2", "_release": "2.6.2", "_resolution": { "type": "version", "tag": "v2.6.2", "commit": "ca45d02757b83367d8455d477e3cbc42dfdee035" }, "_source": "git://github.com/Modernizr/Modernizr.git", "_target": "~2.6.2", "_direct": true } ``` When I download my newly created package, it just contains the same info that I originally checked in to git. Is there a new format for `bower.json` that I should be using? Or did I simply miss something in the setup process?