rkrauter
rkrauter

Reputation: 1169

Bower - Get only files needed (not entire Repo)

I am trying to use Bower to install jquery. The frustrating problem I have been running into is that bower downloads the entire repro. I was hoping to tell bower to install a certain version of jquery and have only those files downloaded.

bower.json in the repo : https://github.com/jquery/jquery/blob/master/bower.json

Thank you

Upvotes: 1

Views: 294

Answers (1)

YvesHendseth
YvesHendseth

Reputation: 1181

I think you didn't unterstand the meening of bower:
Bower is handling you dependencys, so if you do a:

bower install jquery

it should download all files.

Now to you question:
you have following options:

  1. declare wich file you want to download:

    bower install http://code.jquery.com/jquery-2.1.0.min.js

but remember: this file cant be updated easily

  1. search for a js only package:
    expample with bootstrap:

    bower install bootstrap-css-only

but remember: these packages sometimes are not up to date

  1. use bower-installer (recommended):
    install the bower-installer:

    npm install bower-installer --global

and now follow the tutorial:

bower-installer github

sorry for my bad english :-)

Upvotes: 1

Related Questions