Friday, February 7, 2014

Bower 101

Bower is a package management tool for web. Here I list the key commands for bower and git. Bower uses semver to manage dependencies.

npm install -g bower
bower init
bower install <name>=<package>#<version>
bower list
bower search [<name>]
bower uninstall <package-name>
bower cache list
bower cache clean
bower register <my-package-name> <git-endpoint>

For local package (but seems not work, it might result from my local git repo setup)
bower install file:///path-to-the-module/.git/ --save

git init
git init newrepo
git add filename
git add ..
git commit -m "Adding files"
git commit -m "change some files" file1 file2
git commit -a -m "Changed some files"
git status
git rm file
git branch test
git checkout test
git checkout master
git merge test
git branch -d test

No comments:

Post a Comment