{"id":1525,"date":"2015-03-06T15:50:39","date_gmt":"2015-03-06T14:50:39","guid":{"rendered":"http:\/\/blog.gocept.com\/?p=1525"},"modified":"2015-03-06T15:50:39","modified_gmt":"2015-03-06T14:50:39","slug":"manage-javascript-dependencies-with-bowerstatic","status":"publish","type":"post","link":"https:\/\/blog.gocept.com\/2015\/03\/06\/manage-javascript-dependencies-with-bowerstatic\/","title":{"rendered":"Manage JavaScript dependencies with BowerStatic"},"content":{"rendered":"

Last month I explained how to use Fanstatic to manage JS dependencies<\/a>. Since we were more and more displeased by using Fanstatic<\/a>, we recently switched to BowerStatic<\/a>, the new kid on the block. Since the setup is a bit more complicated and you need more tools to have the same features as you had with Fanstatic, I will describe how to set up the full toolchain. After that, I will shortly summarize the benefits and drawbacks of BowerStatic, so you can decide for yourself if you prefer BowerStatic above Fanstatic or the other way around.<\/p>\n

Of course the choices made in the toolchain of BowerStatic are strongly linked to other tools we use. Since we set up large projects using Buildout<\/a>, we like to use Buildout recipes to solve a problem. Therefore this blogpost is most interesting when you are using Buildout yourself.<\/p>\n

How it works<\/h2>\n

BowerStatic was created by Martijn Faassen<\/a>, who was a core developer of Fanstatic. We think of BowerStatic as a reimagined version of Fanstatic, avoiding disadvantageos decisions made in the past. One problem of Fanstatic was, that it tried to do too many things: Fetching the files, delivering them to the client and bundling them into one large file.<\/p>\n

Therefore BowerStatic has a narrow focus: It only helps to manage which libraries should be delivered to the client. It does not care how the files were retrieved or whether you want to have a bundled resource. To automate these steps as well, you must look for additional tools.<\/p>\n

We use the following toolchain:<\/p>\n