alnafie
alnafie

Reputation: 10798

How does jquery's bower.json file point to a folder not included in git?

I am trying to understand how bower works..

If you look at jquery's github repo https://github.com/jquery/jquery you will see that the bower.json file points to dist/jquery.js. However, the repo does not include this folder on github, because the /dist folder is a product of the build step that is not checked into git (it is included in .gitignore).

So I am at a loss for how bower finds the dist/jquery.js file when it is not included in the git repo??

Upvotes: 2

Views: 308

Answers (2)

oba-squid
oba-squid

Reputation: 11

As @cbuckley said, the trick is that Bower will checkout from Git a tagged version instead of the master head. If you have a look at Jquery, the 2.1.1 tagged version has a jquery.js in dist/

Upvotes: 1

cmbuckley
cmbuckley

Reputation: 42458

A couple of other points that should lead you on your way:

  • Gruntfile.js has a build task that outputs the built file to dist/jquery.js (see also build/tasks/build.js).
  • package.json has a dependency on grunt-bowercopy.

Related: Managing Bower components with Grunt

Upvotes: 2

Related Questions