Updating Foundation in an Existing NOUVEAU Project
Since NOUVEAU is a starter theme, not a parent theme, there’s no automatic WordPress admin update when a new version comes out. So what do you do if you are working on a NOUVEAU project and you want to update to the latest, greatest version of Foundation?
I have good news: updating Zurb Foundation 5 in your NOUVEAU project a very simple process, since everything is kept separate, tidy, and modular. Here’s how you do it…
Using Bower to Update
In most cases, to get the latest version of Foundation, all you need to do is run a bower update from your theme’s _foundation folder. This is usually as simple as opening a command prompt (e.g. Terminal) and typing:
bower update -h
Using CodeKit to Update
If you are using CodeKit, you can run the update from there instead. To do this:
- In your CodeKit project, select Assets.
- Select the Installed tab.
- Select the small, grey hamburger icon beside the tabs.
- Select “Update all installed components”.
The above steps should be all you need to get Foundation updated in most NOUVEAU projects.
In general, you will never need to update anything outside of the
_foundation/bower_components/ folder… and in fact, doing so can sometimes cause things to break as NOUVEAU uses some slightly modified files under
Whenever I update NOUVEAU core, I always include the latest version of
_foundation/scss/_settings.scss with the latest Foundation version – but this is rarely necessary when updating an existing project. If a major new breaking change is ever introduced, I will add directions to this blog on how to update to that version (and I’ll update the current version of NOUVEAU, of course).
Updating NOUVEAU‘s PHP
Strictly speaking, you will never, ever need to update NOUVEAU‘s PHP framework. When new features are added, they will be added as plugins… and failing that, should any major theme changes ever occur, I’ll be sure to do a writeup on this blog so you can copy the relevant updates into your project as painlessly as possible. Remember, NOUVEAU was created to be customized and modified according to your needs and whims – it’s a starting point, and was created to be flexible, well structured, and convenient, so that you wouldn’t need to update it like you would a parent theme.
If you ever find your NOUVEAU theme is hopelessly obsolete, it’s likely the year 2020, and it’s maybe time to start working on something new.
Scary Miscellaneous Warnings
I probably don’t have to tell you this, but you should really backup your files before doing this. Just in case.
After doing the update, check your project to ensure everything still works and you’re not getting any 404 errors from the enqueued files. On the off-chance you do see some 404s after an update, it means that the location of some pre-minified files have changed inside
_foundation/bower_components/ – find the new location and then update
NV\Config::enqueue_assets() with the new paths. It’s that simple!