-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a configuration parameter for the bower cache storage directory #98
Comments
I think this command sp:bower:install could be used to prepare a server and without the obligation to reload it after each deploy. So to have a different cache than symfony seem to me a good idea. As i can commit the spbower cache and leave the symfony cache clear. All my server don't have php and nodejs installed together (a security hole for now : debian having not yet a prod version of nodejs) @jrobeson Or maybe are you right with this another solution : Even without cache the bundle should give js and css corresponding only to package name. |
The cache from bower has nothing to do with the cache from this bundle. The cache from this bundle is used to store the mapping received from |
i know that, but i mean specifying the cache in the .bowerrc so bower won't try to write a cache in an unwriteable directory |
I agree. Every now and then I get the message: InvalidArgumentException: The directory "/foo/BarBundle/Resources/config/bower/../../public/components/cache" is not writable. This cache folder should not be in my bundle directory structure but rather somewhere in app/cache. |
@Spea Ow, that is awesome! Sorry for the confusion. |
@Spea : regarding your last response: but why is the default to ever write there? |
There were some errors when using the app/cache directory for this cache. Also it was kinda slow to recreate the asset-cache on every cache:warmup, thats why I decided to use another directory as the default one, but you can still change it ;) |
So i understand better as the cache works. Event that, I have yet a problem with the actual cache : Recreated the sp cache, demand |
I will try to change this behaviour. |
What is the correct way to provide custom cache service? In order to fix our issue described in #123 I wanted to set service for cache:
I always get exception:
When I dump available services (
So it's impossible to use custom (external) service? |
I tried using the default So, I figured why not use something like sp_bower:
bundles:
AppBundle:
cache: %kernel.cache_dir%/../bower/%kernel.environment% Could there be any downsides to this that I am unaware of? Thanks! |
@liviucmg that's actually a really good idea! +1 |
actually i discovered that @liviucmg is a very problematic solution, since the cache should not be created for every environment.
|
during the bower installation phase it creates a cache directory here:
/path/to/bundles/AcmeBundle/Resources/config/bower/../../public/components/cache
I don't think it should attempt to write anywhere except the symfony cache and the target asset location.
It is possible to configure these directories via this entry in a
.bowerrc
:as per this stackoverflow post: http://stackoverflow.com/questions/17881116/how-to-change-bower-default-cache-git-templates-completion-folder-locations/18564317#18564317
or this with the bower command itself:
although there could be some problems with that as per this bower issue:
bower/bower#1043 if the build system is not connected to the internet.
This is my first time using bower, so my assessment of how to solve this problem could be incorrect.
The text was updated successfully, but these errors were encountered: