Skip to content

Instantly share code, notes, and snippets.

@icemancast
Last active September 2, 2015 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icemancast/65212c1503e73137ef55 to your computer and use it in GitHub Desktop.
Save icemancast/65212c1503e73137ef55 to your computer and use it in GitHub Desktop.

Bower Installation and usage

Install Nodejs

Instal bower

$ npm install -g bower

Create test directory

$ cd ~/vagrant-lamp/sites/codeup.dev
$ mkdir bower_test

Initiate project

$ touch .bowerrc
$ bower init

Edit .bowerrc

I tend to control where I want my dependencies to install on. So I do this by entering the following in the .bowerrc file.

{
  "directory": "assets/vendor/"
}

Install dependency

Before installing a depency we can search for one to see if we want to install it.

$ bower search bootstrap

As you can see there are a lot of packages that we have available that are associated with bootstrap. Bower has packages for just about any dependecy. For dependencies that don't have packages we are able to install those as well via a github url. We can specify the search a little more.

$ bower search bootstrap-sass

To save the package we need we can do the following:

$ bower install bootstrap-sass-official --save

Next install bootstrap html template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment