Menu icon Foundation
Upgrading From Foundation 3.2

I have built several sites using Foundation 3.2 that I need to continue to edit. I never did start using Foundation 4, but if I install Foundation 5 on my machine, will is mess with my ability to work on the F3 sites I still maintain?

It is critical that I don't screw up current work and I am a not very good with command line, so this stuff intimidates me. F5 has so many features I've been looking for, so I really want to start using it, but I need a little help first to preserve the existing work before I upgrade.

Any direction on how to do this safely is much appreciated.

upgrade

I have built several sites using Foundation 3.2 that I need to continue to edit. I never did start using Foundation 4, but if I install Foundation 5 on my machine, will is mess with my ability to work on the F3 sites I still maintain?

It is critical that I don't screw up current work and I am a not very good with command line, so this stuff intimidates me. F5 has so many features I've been looking for, so I really want to start using it, but I need a little help first to preserve the existing work before I upgrade.

Any direction on how to do this safely is much appreciated.

Rafi Benkual about 5 years ago

This question really depends on your need to support IE8 or older. Otherwise from F3, the columns syntax has slightly changed: and there is no longer Zepto support, which should not be an issue. Foundation 3 used regular tabs and accordions instead of sections. This is how Foundation 5 is too.

Check out the compatibility guide:
http://foundation.zurb.com/docs/compatibility.html

Beda Steinacher about 5 years ago

You should use Bundler http://bundler.io/ to use a specific version of foundation.

You can read about this in the "Creating a project from Git" section of the foundation 3 documentation http://foundation.zurb.com/docs/v/3.2.5/compass.php

Instead of using the latest release candidate I'm forcing an older foundation version.
Here is my setup:
Gemfile

source "https://rubygems.org"
gem "zurb-foundation", "3.2.5"
gem "compass"

To install the specific zurb-foundation version:

bundle exec sudo gem update zurb-foundation

Verify the currently installed zurb-foundation version in your project folder:

bundle exec gem list

To work with the older version, you always have to use the 'bundle exec' commands:

bundle exec compass watch

Hint:
If you use grunt, you can setup a compass task with the bundleExec option set to true. Checkout the following Plugin:
https://github.com/gruntjs/grunt-contrib-compass

All I have to do remember is

grunt watch

Gruntfile.js
Javascript
module.exports = function (grunt) {
grunt.initConfig({
compass: {
dist: {
options: {
require: 'zurb-foundation',
sassDir: './path/to/sources',
cssDir: './path/to/stylesheets',
imagesDir: './path/to/images',
javascriptsDir: './path/to/javascripts',
outputStyle: 'compressed',
relativeAssets: true,
bundleExec: true
}
}
},
watch: {
css: {
files: ['./path/to/sources/*'],
tasks: ['compass']
}
}
}
);
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
};

James Stone about 5 years ago

If you are only using Foundation 5 you don't have anything to worry about because the gem file is different: foundation vs. zurb-foundation. If you need to use Foundation 4 or accidentally update your gemset beyond the version you are using the bundle exec / bundler method proposed by Beda is your best bet.

I also talked about this method in a stack overflow post:

http://stackoverflow.com/questions/15175775/how-can-i-specify-framework-version-in-compass-create/15192829#15192829

created a script that automates the process of creating the gemfile:

https://github.com/manofstone/zurb-foundation-useful-scripts/blob/master/compass/compassf_version.sh

and it is also a part of the official docs by zurb (scroll down to running multiple versions):

http://foundation.zurb.com/docs/v/4.3.2/sass.html

I would recommend skipping foundation 4, jump right to 5 and only update your gemfile to the version of Foundation 3 that you work with. That will be the fastest workflow. Just don't run gem update or you will always get the latest version.