Join us on the demo, while our product experts provide a detailed walkthrough of our enterprise platform.

Install Bootstrap with Bower

Learn how the Bower package manager helps into quick components deploy and install Bootstrap using Bower

Pascal Noel
Pascal Noel
July 05, 2017

Bower is a popular package manager to help you quickly deploy components. In this article I'm going to show you how to install Bower and how to use it to install Bootstrap.

Pre-requisites: To install Bower you must first have Node.js and npm (another package manager) installed, your computer may have shipped with these pre-installed. To check if you have npm, open your command-line tool and type:

npm -v

If you do not get a version number, you may need to install npm which comes pre-packaged with Node.js

You can find Node.js along with instructions on how-to install it here: https://nodejs.org/en/

Windows Users Only: If you're a Windows user make sure you have Git for Windows installed to work with the Windows Command Prompt with Checkout Windows-Style and commit Unix-style line endings. You can find more information on that here: https://git-for-windows.github.io

Installation:

Provided that you have both Node.js and npm installed, run the following command in your Command-line tool:

npm install -g bower

Usage:

Once Bower is installed it's as easy as going to your project folder in Command-line and typing:

bower install bootstrap

followed by:

bower install jquery

This will install the files required for Bootstrap in the newly created 'bower_components' folder.

In this folder you will have 2 new folders 'bootstrap' and 'jquery'.

The next step is to include the files for both jQuery and Bootstrap into your project file(s).

...And that's it, you're good to go.

Updating

If you need to update a project and are unsure which bower packages you have installed that might need an update, you can type

bower list

in your project directory for a listing of packages you installed via Bower and which ones are due for an update.

in this case if we wanted to update our bootstrap install we would do:

bower update bootstrap

Making your Bower configurations portable

Once you have figured out your configurations and installed all of your desired Bower packages you can use:

bower init

Follow the steps provided in your Command-line.

This will initialize a bower.json file which will store your configurations.

Once you have your Bower.json file you can move it around to other locations or projects and you can get Bower to reinstall all of your packages and configurations by typing:

bower install

This will get Bower to create another 'bower_components' folder with the same packages and configurations specified in your bower.json file.

For further information on using or configuring Bower You can checkout the official website


LoginRadius Docs

Implement Authentication in Minutes

click here

Most Popular Tags

EngineeringJavaScriptCSSNodeJSOAuthSocialLoginSecurityAuthenticationDenoFacebook

About LoginRadius

LoginRadius provides a comprehensive set of APIs to enable authentication, identity verification, single sign-on, user management, and account protection capabilities such as multi-factor authentication on any web or mobile application. The company offers open source SDKs, integrations with over 150 third party applications, pre-designed and customizable login interfaces, and best-in-class data security products. The platform is already loved by over 3,000 businesses with a monthly reach of 1.17 billion users worldwide.

For more information, visit LoginRadius

Pascal Noel

Pascal Noel

Software Engineer and adventure seeker with a knack for fun facts. Originally from the East Coast of Canada, moved to Vancouver to enjoy its mild climate and now staying for its scenic hikes.

View Profile

Try a Modern Authentication Solution

$0/ month

Free Sign Up
  • 5,000 MAU
  • 1 Web or mobile app
  • Standard login
  • 3 Social Login Providers
  • Transactional Email Template
  • Customizable Login Interfaces