Bower_cache usage, bower Installation
bower cache
Function: Manage package cache
For windows usersC:\Users\dulin\AppData\Local\bower\cache\packages
The directory isbower
Cache of all installed packages
Usage:
$ bower cacheUsage: bower cache <command> [<args>] [<options>]Commands: clean Clean cached packages list List cached packages
Uselist
Command to list the cache of all packages installed
$ bower cache listangular=git://github.com/angular/bower-angular.git#1.3.15angular-animate=git://github.com/angular/bower-angular-animate.git#1.3.15angular-route=git://github.com/angular/bower-angular-route.git#1.3.15angular-touch=git://github.com/angular/bower-angular-touch.git#1.3.15jquery=git://github.com/jquery/jquery.git#2.1.4Mock.js=git://github.com/nuysoft/Mock.git#0.1.9
Useclean
Command to clear the cache of all packages installed
$ bower cache cleanbower deleted Cached package angular: C:\Users\dulin\AppData\Local\bower\cache\packages\ef2188def21eb1bbd1f1792311942a53\1.3.15bower deleted Cached package angular-touch: C:\Users\dulin\AppData\Local\bower\cache\packages\8926838ac25d624594e3d6618381d070\1.3.15bower deleted Cached package angular-route: C:\Users\dulin\AppData\Local\bower\cache\packages\a79b04bbe7ddc8d7be946d2012fca5b7\1.3.15bower deleted Cached package angular-animate: C:\Users\dulin\AppData\Local\bower\cache\packages\1e5d36753a7672512aa68fc8cdf5a6ce\1.3.15bower deleted Cached package jquery: C:\Users\dulin\AppData\Local\bower\cache\packages\fe2fe255e91d251051d543998aa8327a\2.1.4bower deleted Cached package Mock.js: C:\Users\dulin\AppData\Local\bower\cache\packages\c6f933bc2d5129e99678e3ca643531ad\0.1.9
Use againlist
Command to view, the package cache has been cleared and deleted
$ bower cache list
EnterC:\Users\dulin\AppData\Local\bower\cache\packages
Check that the cached package file is indeed deleted.
Install the package from the local cache:
bower
Supports offline installation packages from the local cache, provided that this package exists in the cache.
Offline installation package:
$bower install <package> --offline
Supplement:
To view the cache of a specified package name, you only need to specify the package name. For example:
$ bower cache list jqueryjquery=git://github.com/jquery/jquery.git#2.1.4
View the cache of multiple specified package names, which are separated by Spaces
$ bower cache list jquery Mock.jsjquery=git://github.com/jquery/jquery.git#2.1.4Mock.js=git://github.com/nuysoft/Mock.git#0.1.9
Description:=
The package name is before the number,#
Is the version of the package. View the cache of a specified package name, which is useful when a package has multiple versions.
Similarly, clear the cache of the specified package.
$ bower cache clean jquerybower deleted Cached package jquery: C:\Users\dulin\AppData\Local\bower\cache\packages\fe2fe255e91d251051d543998aa8327a\2.1.4
To clear the cache of a package of a specified version, add the package name#<version>
$ bower cache clean jquery-ui#1.11.4bower deleted Cached package jquery-ui: C:\Users\dulin\AppData\Local\bower\cache\packages\3725aca888af41d0b2de2b0b81f8307b\1.11.4
Clear the cache of packages of multiple specified versions. Separate package names with spaces
$ bower cache clean jquery#2.1.4 Mock.js#0.1.9bower deleted Cached package jquery: C:\Users\dulin\AppData\Local\bower\cache\packages\fe2fe255e91d251051d543998aa8327a\2.1.4bower deleted Cached package Mock.js: C:\Users\dulin\AppData\Local\bower\cache\packages\c6f933bc2d5129e99678e3ca643531ad\0.1.9