Skip to content

Instantly share code, notes, and snippets.



Last active Oct 14, 2016
What would you like to do?
Un gulpfile utile pour Foundation
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var argv = require('yargs').argv;
var port = process.env.SERVER_PORT || 3000;
var browser = require('browser-sync');
// Check for --production flag
var isProduction = !!(argv.production);
var sassPaths = [
// Starts a BrowerSync instance.
gulp.task('serve', ['sass'], function() {
server: './',
port: port,
index: "decoupe-home.html"
// Compiles the sass stylesheets.
gulp.task('sass', function() {
return gulp.src('./scss/app.scss')
includePaths: sassPaths,
outputStyle: 'compressed'
.on('error', $.sass.logError))
browsers: ['last 2 versions', 'ie >= 9']
.pipe($.if( ! isProduction, $.sourcemaps.write('../css')))
// foundation watch
gulp.task('default', ['serve', 'sass'], function() {['./scss/**/*.scss'], ['sass', browser.reload]);['*.html'], [browser.reload]);
// foundation build
gulp.task('build', ['sass']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.