From 48284952a3dd8d65111da00df30140b54fb0024c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 13 Dec 2016 22:56:33 +0000 Subject: [PATCH] Move Gulp config --- gulpfile.config.js | 22 ++++++++++++++++++++++ gulpfile.js | 20 +------------------- 2 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 gulpfile.config.js diff --git a/gulpfile.config.js b/gulpfile.config.js new file mode 100644 index 00000000..be7d98a8 --- /dev/null +++ b/gulpfile.config.js @@ -0,0 +1,22 @@ +module.exports = function (plugins) { + var config = { + autoprefixer: { + browsers: ["last 2 versions", "> 5%"] + }, + bowerDir: 'vendor/bower_components', + fontsDir: 'source/assets/fonts', + js: { + sourceDir: 'assets/js', + outputDir: 'source/assets/js', + pattern: '/**/*.js' + }, + production: !!plugins.util.env.production, + sass: { + sourceDir: 'assets/sass', + pattern: '/**/*.sass', + outputDir: 'source/assets/css' + } + } + + return config; +} diff --git a/gulpfile.js b/gulpfile.js index 5655c2b8..8b6f0fe8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,27 +2,9 @@ var gulp = require('gulp'); var plugins = require('gulp-load-plugins')(); +var config = require('./gulpfile.config.js')(plugins); var del = require('del'); -var config = { - autoprefixer: { - browsers: ["last 2 versions", "> 5%"] - }, - bowerDir: 'vendor/bower_components', - fontsDir: 'source/assets/fonts', - js: { - sourceDir: 'assets/js', - outputDir: 'source/assets/js', - pattern: '/**/*.js' - }, - production: !!plugins.util.env.production, - sass: { - sourceDir: 'assets/sass', - pattern: '/**/*.sass', - outputDir: 'source/assets/css' - } -}; - var app = {}; app.sass = function(paths, filename) {