top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Bower and How to install?

0 votes
900 views

What is Bower?

Bower is a package manager for web.

Bower is a package manager for Javascript libraries that allows you to define, version, and retrieve your dependencies.

Bower, a package manager that makes it easy to manage all your application’s front-end dependencies.

It offers a generic,unopinionated solution to the problem of front-end package management.

Bower is optimized for the front-end. Bower uses a flat dependency tree, requiring only one version for each package, reducing page load to a minimum.

How to install?

Bower is a command line utility. Install it with npm.

Bower requires Node and npm and Git.

$ npm install -g bower

Install Packages

$ bower install <package>

For examples

# registered package
$ bower install jquery

# GitHub shorthand
$ bower install desandro/masonry

# Git endpoint
$ bower install git://github.com/user/package.git

# URL
$ bower install http://example.com/script.js 

Video for What is Bower?

References

http://bower.io/
posted Jan 22, 2015 by anonymous

  Promote This Article
Facebook Share Button Twitter Share Button LinkedIn Share Button


Related Articles

What is Bower?
Bower is just a package manager. The important thing to note here is that Bower is just a package manager, and nothing else. It doesn't offer the ability to concatenate or minify code, it doesn't support a module system like AMD: it's sole purpose is to manage packages.

Bower is a package manager. It's good at, well, managing packages

Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you’re looking for.

There are some things you'll need before you can start working with Bower:

  • The command line. 
  • Node and NPM. Bower is a Node module so to get it you need NPM.
  • Git. Bower packages are Git repos. Bower uses Git to understand where the package is, what version it's on—that sort of thing.
  • Global Installation. Technically you could install it in every project but you'll probably want to have it everywhere.

To work with Bower you'll need Node.js and git. Installation:

 npm install -g bower

 Video about Bower introduction

https://www.youtube.com/watch?v=HHNf512zM-M​

READ MORE

In this article I will tell you how to install node in Ubuntu,Windows and MAC and How to start.

Install Node.js in Ubuntu

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Above code will help you to install the latest version of the node.

using Git also can install nodejs

First install the dependencies

sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core

Then run the following commands

git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

After installing you can check the version of nodejs by using the following command

node -v

Install nodejs in Windows

Install Node js using cygwin

What is cygwin?

Cygwin is free software that provides a Unix-like environment and software tool set to users of any modern x86 32-bit and 64-bit versions of MS-Windows

First,you need cygwin to install node in windows

To do so, follow these steps:

Step-1:Install cygwin.
Step-2:Use setup.exe in the cygwin folder to install the following packages:
Step-3 :

devel → openssl
devel → g++-gcc
devel → make
python → python
devel → git

Step-4:Open the cygwin command line with Start > Cygwin > Cygwin Bash Shell.

Then Run the below commands to download and build node.

git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

Without using cygwin to install node.

Follow the below steps to install

1)Visit nodejs.org
2)Click the “install” button to download the installer.
3)Run the installer (make sure you tell the installer to add references to your PATH system variables).
4)Reboot your PC.
5)That’s it!You Successfully installed nodejs

How To check the version of nodejs in windows

1)Press Win + R (for Run)
2)Type: CMD
3)Click OK

Then in command prompt type the following command to see the version of nodejs

node --version

Install Node.Js in MAC

If you're using the excellent homebrew package manager, you can install node with one command:

brew install node

Otherwise, follow the below steps:

1)Install Xcode.
2)Install git.
Then run the following commands:

git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

So,now installation node.js part is over.So next part is how to start node.js?

How to Start?

Simple Example for Hello Node

1)First Create one javascript file with the name of hellonode.js

2)Then enter the below code in that file

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello Node.js\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');

3)Then open the command line(for windows),Terminal(For Ubuntu) and type follwing command to execute the First Simple Node Program

node hello_node.js

Output for the above Program

Server running at http://127.0.0.1:8124/
READ MORE
...