{"id":821,"date":"2016-01-13T18:24:07","date_gmt":"2016-01-13T09:24:07","guid":{"rendered":"http:\/\/n8finch.com\/?p=821"},"modified":"2019-06-30T07:03:39","modified_gmt":"2019-06-29T22:03:39","slug":"learning-new-things-bower","status":"publish","type":"post","link":"https:\/\/n8finch2024.local\/learning-new-things-bower\/","title":{"rendered":"Learning New Things: Bower"},"content":{"rendered":"
<\/a>Along with Grunt<\/a><\/strong>, another tool I’ve been playing around with is Bower<\/a><\/strong>.<\/p>\n What is Bower? It’s a package manager for the web, duh!<\/p>\n Ok, let’s back up. What does that even mean?<\/p>\n Two\u00a0bits of information should help clarify:<\/p>\n Let’s dive in…<\/p>\n I’m going to quote directly from Bower’s About<\/a><\/strong> page:<\/p>\n Bower is named after the bowerbird<\/a>, a family of birds<\/a> where males build a structure [the bower] and decorate it with sticks and brightly coloured objects in an attempt to attract a mate. Bower does just that. Bower brings together bits and pieces from across the forest so you can build your structure.<\/p>\n<\/blockquote>\n Despite the Commonwealth spelling of “colored”, this helped me make sense of what is going on with Bower, at least as I understand it.<\/p>\n When putting together a site for a client, I’m using different front-end components and frameworks to build the look of the site. Sometimes I’m using Genesis, and sometimes I’m using a theme. I’ve started to look into using other front-end frameworks and technologies like Bootstrap, Foundation, Animate.css, Masonry.js, and the list goes on.<\/p>\n So, how do I keep these different assets, or “packages” managed and updated with the latest features? Do I even want to do this?<\/p>\n Once Bower is installed, and I have called in different packages, if there are updates to those packages, I can simply run the command This is something similar to the dreaded (or welcome!) WordPress updates that happen fairly regularly. WordPress core or plugin authors\u00a0will push out an update to their plugins, and these typically require a manual update to the site (auto updates are available now as well). Updating to the latest version\u00a0provides\u00a0at least three benefits:<\/p>\n If\u00a0it behooves me to keep my WP core, themes and plugins up to date, then maybe I want Bower to help manage regular updates to these front-end packages (a.k.a. dependencies) as well.<\/p>\n Fairly simple to update and plenty of benefit in doing so. I’ll take it!<\/p>\n All you have to do is install Bower in your project files by navigating to your current theme directory, and start installing packages with \n
The Name<\/h2>\n
\n
Using Bower to Keep Things Current<\/h2>\n
bower update<\/code> in the command line to cycle through all\u00a0my packages and update components.<\/p>\n
\n
Yes, I Want the Updates<\/h2>\n
bower install<\/code> and then the package name. So something like
bower install jquery<\/code> is a great example.<\/p>\n