Javascript - Bouwer (Package manager)

About

Bouwer is a package manager.

Installation on Windows

  • install bower
npm install -g bower
C:\Users\NicolasGERARD\AppData\Roaming\npm\bower -> C:\Users\NicolasGERARD\AppData\Roaming\npm\node_modules\bower\bin\bower
[email protected] C:\Users\NicolasGERARD\AppData\Roaming\npm\node_modules\bower

Package

bower search <query>

Install

Syntax:

bower install <package>#<version>

Installed packages will be stored in the bower_components directory which is:

Example with Jquery:

bower install jquery
? May bower anonymously report usage statistics to improve the tool over time? Y (Y/n)
? May bower anonymously report usage statistics to improve the tool over time? Yes
bower not-cached    git://github.com/jquery/jquery.git#*
bower resolve       git://github.com/jquery/jquery.git#*
bower download      https://github.com/jquery/jquery/archive/2.1.4.tar.gz
bower extract       jquery#* archive.tar.gz
bower resolved      git://github.com/jquery/jquery.git#2.1.4
bower install       jquery#2.1.4

jquery#2.1.4 bower_components\jquery

Use

With the script element

<script src="bower_components/jquery/dist/jquery.min.js"></script>

Update

bower update # update all packages
bower update <package> # update one packages

Save

Packages are defined by a manifest file bower.json.

bower init will create it interactively.

bower init

Command

http://bower.io/docs/api/

Cache

bower cache list
d3=git://github.com/mbostock/d3.git#3.5.6
jquery=git://github.com/jquery/jquery.git#2.1.4





Discover More
Javascript Package - Package Manager

This article talks package manager in Javascript. They are the first component of the web toolchain as they permit to: declare package as dependency download and update package create a package...



Share this page:
Follow us:
Task Runner