On *nix, bower uses the ~/.bower
folder for its cache (packages and so on).
I would like to change this to a different location.
The bower spec document from suggests that I configure the storage
key in my .bowerrc
.
I have created one in my project folder like so:
{
"storage": {
"cache": "~/blah/cached",
"git": "~/blah/git_templates"
}
}
When running bower install - i
see that it still tries to save into ~/.bower
.
Can anyone tell me what I am doing wrong here ? And/or if there is a different way to change the location ?
I had the same problem, after some tries according the spec, I gave up...
So I reviewed bower
's history on github and found:
v0.10.0
, bower used config.cache (lib/core/ResolveCache.js
) for its cache locationstorage [object]
Where to store persistent data, such as cache, needed by bower. Defaults to paths that > suite the OS/platform. Valid keys are
cache
,registry
,links
,completion
.
However, after this commit, satazor now uses config.storage.packages instead of config.storage.cache
After that, in the v1.0.0
release, the config
is always set to config.storage.packages, but the spec has not reflected this change ever since
bower_storage__packages
Use a .bowerrc
such as:
{
"storage":{
"packages":"/path/to/cache"
}
}
P.S.: I think that linking the spec doc in Google Docs isn't a good idea, maybe github would be a more sensible choice (since we can issue pull requests).
What version of bower are you using? Bower 1.0.0 no longer uses ~/.bower. It follows the XDG spec, http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
The "storage" property is only valid for 1.0.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With