Skip to content

Instantly share code, notes, and snippets.

@sveetch
Last active March 2, 2017 10:27
Show Gist options
  • Save sveetch/ebe8f9b8d3bf1bc6e9504ed7591c2a70 to your computer and use it in GitHub Desktop.
Save sveetch/ebe8f9b8d3bf1bc6e9504ed7591c2a70 to your computer and use it in GitHub Desktop.
Deploying Foundation6 sources
{
"directory": "../../foundation-sites-6.3.1/vendor"
}

This is a sample Makefile and stuff to download and install Foundation6 sources into your project.

The Bower files are used to install and build required vendor libraries (jquery, etc..), they should be in a dedicated directory so they won't interfere with your project files.

Create a requirements/foundation6 directory and put the Bower files in it.

Then just execute:

``make install-foundation6``

Note than everything will be stored in sources/js/foundation6, you may change it to your project assets structure.

This install does not copy anything from Foundation Sass files since they should be imported in your boussole/compass config directly from Foundation6 sources.

{
"name": "sveetoy-demo-f6",
"ignore": [
],
"dependencies": {
"jquery": ">= 2.2.0",
"what-input": "4.0.3",
"modernizr": "2.8.3",
"jquery.cookie": "~1.4.0"
},
"private": true
}
.PHONY: help install-foundation6 clean-foundation6
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo
@echo " install-foundation6 -- to install last Foundation6 sources. Will require 'wget' and 'bower'."
@echo
@echo " clean-foundation6 -- to clean your local repository from all installed stuff."
@echo
clean-foundation6:
rm -Rf foundation-sites-6.3.1
rm -Rf sources/js/foundation6/foundation
rm -Rf sources/js/foundation6/vendor/*.js
install-foundation6: clean-foundation6
mkdir -p sources/js/foundation6/vendor
@echo "* Download Foundation 6.3.1 archive;"
wget https://github.com/zurb/foundation-sites/archive/6.3.1.tar.gz
@echo "* Open archive;"
tar xvzf 6.3.1.tar.gz
@echo "* Delete archive;"
rm -Rf 6.3.1.tar.gz
@echo "* Use 'bower' to get Foundation dependencies"
cd requirements/foundation6 && bower install
@echo "* Link Foundation Javascript files into project sources"
cd sources/js/foundation6 && ln -s ../../../foundation-sites-6.3.1/dist/js foundation
cd sources/js/foundation6/vendor && ln -s ../../../../foundation-sites-6.3.1/vendor/jquery/dist/jquery.js
cd sources/js/foundation6/vendor && ln -s ../../../../foundation-sites-6.3.1/vendor/modernizr/modernizr.js
cd sources/js/foundation6/vendor && ln -s ../../../../foundation-sites-6.3.1/vendor/jquery.cookie/jquery.cookie.js
cd sources/js/foundation6/vendor && ln -s ../../../../foundation-sites-6.3.1/vendor/what-input/dist/what-input.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment