Closed ghost closed 8 years ago
All the complications that bower introduces is precisely why fetcher was created. One of your requirements–preventing libraries from being committed to our source repository–exposes one of the biggest flaws in bower. Bower does not guarantee that the bytes on disk from library X will be the same between multiple bower install
s. Hence, we have found that keeping vendor libraries in the source repository is a better alternative to ensure that multiple builds of the same app result in the same bytes. Further, since bower does not support or resolve nested dependencies, dealing with version conflicts remains a problem that must be resolved manually. Using fetcher to download vendor libraries ensures that this concern is not ignored or hidden from the developer.
In our use, we have found that vendor libraries are updated so rarely that managing them manually is largely a non-issue. And the primary function that bower excels at (making it easy to pull down libraries) is accomplished neatly with fetcher.
The final annoyance with bower, as you are experiencing, is that bower largely functions by pulling down the entire git repository of a library. There are numerous solutions to this problem that can be used or repurposed. As lineman itself is built on grunt, I would recommend looking into these tools and hooking them into lineman's pipeline. This would allow you to skip fetcher and mostly ignore vendor
as well. There also exists lineman-bower for integrating the bower install step into the lineman build pipeline.
Whether you use the grunt plugins listed above or not, you can just use lineman's files
configuration to pluck out the files from bower components that need to be compiled into the final bundle.
(for more reading on some of the issues with bower: http://gofore.com/ohjelmistokehitys/stop-using-bower/)
Thanks for the thoughtful reply. I'll study your recommendations and report back when the work is done.
I'm writing to ask for your suggestion on the best way to integrate a bridge between a bower_components and the vendor folder. Unfortunately, fetcher does not work for us. Please read on.
Our goal is to prevent the Solution Libraries, hereon referred to library(ies), from being committed to our source repository, while being able to retrieve them seamlessly for maven-centric UI construction workflows, which is a corporate requirement. This means that these libraries must be installed seamlessly using our maven workflow and that a UI software engineer can seamlessly add/update libraries.
I have opted for a bower-centric approach, spiced up with concepts borrowed from the fetcher architecture. The rational for this lies in my belief that, in the long term, we will use bower, or a similar manager; hence, I prefer the idea of building a bridge between bower and the vendor folder, rather the bypassing the library repository altogether; in fact, ideally, linemanjs would enable us to name the desired library component(s) straight out of their local bower repository.
The solution elements include:
The developer workflow is as follows:
We have two outstanding workflow and technical questions with respect to the best way to integrate the bridge task into our UI software engineering workflow. The outstanding questions are:
Thanks in advance for your thought and suggestions!
Regards