Move Gulp config

This commit is contained in:
Oliver Davies 2016-12-13 22:56:33 +00:00
parent 2b28a547a6
commit 48284952a3
2 changed files with 23 additions and 19 deletions

22
gulpfile.config.js Normal file
View file

@ -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;
}

View file

@ -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) {