About
Bouwer is a package manager.
Articles Related
Installation on Windows
- install git with the option “Run Git from the Windows Command Prompt”. Bower is built on top of Git.
- install node.Js. It comes with the node package manager (npm).
- 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
Search
bower search <query>
Install
Syntax:
bower install <package>#<version>
Installed packages will be stored in the bower_components directory which is:
- of defined in the .bowerrc configuration file
- of just a sub folder of the working directory (ie where the bower program was executed)
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
Cache
bower cache list
d3=git://github.com/mbostock/d3.git#3.5.6
jquery=git://github.com/jquery/jquery.git#2.1.4