Bower: Install package that doesn't have bower.json file

415 Views Asked by At

I'm trying to get Bower to install this javascript: https://github.com/markmalek/Fixed-Header-Table

I use: bower install [email protected]:markmalek/Fixed-Header-Table.git --save

It installs the package into bower-components, and even adds it to my project's bower.json, but it doesn't add the to my html. I'm guessing it's because that particular git repo doesn't contain a bower.json telling my project which js file is the main one. So how do I install this package?

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

This answer takes your assumption that your HTML is picking up scripts loaded via Bower using the bower.json file as correct.

There are two options. The quickest is to fork the repo yourself, and in the main directory use the command bower init to create your own bower.json file in your forked version of the repo. Then, change the github url to the repo to your forked version rather than the original you have above.

The second option is to submit a pull request to the package owner adding a bower.json file so that you can continue to pull directly from his repo.

There are probably more options like manually loading the script outside of pulling from a bower.json file but the two above seem simplest.