From: Geoff Kimball Date: Mon, 28 Mar 2016 20:17:16 +0000 (-0700) Subject: In customizer Gulp tasks, add default values for the --modules and --output flags... X-Git-Tag: v6.2.1~30^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dde350edebf6678ec4cfde21e0112df6918be07f;p=thirdparty%2Ffoundation%2Ffoundation-sites.git In customizer Gulp tasks, add default values for the --modules and --output flags, and ensure all files print to the correct output directory --- diff --git a/gulp/customizer.js b/gulp/customizer.js index 32f80983b..c800994cd 100644 --- a/gulp/customizer.js +++ b/gulp/customizer.js @@ -21,7 +21,7 @@ var zip = require('gulp-zip'); var ARGS = require('yargs').argv; var FOUNDATION_VERSION = require('../package.json').version; -var OUTPUT_DIR = ARGS.output; +var OUTPUT_DIR = ARGS.output || 'custom-build'; var CUSTOMIZER_CONFIG; var MODULE_LIST; var VARIABLE_LIST; @@ -29,7 +29,7 @@ var VARIABLE_LIST; // Load the configuration file for the customizer. It's a list of modules to load and Sass variables to override gulp.task('customizer:loadConfig', function(done) { fs.readFile('customizer/config.yml', function(err, data) { - var moduleListPath = ARGS.modules; + var moduleListPath = ARGS.modules || '../customizer/complete'; var moduleList = require(moduleListPath); CUSTOMIZER_CONFIG = yaml(data.toString()); @@ -59,7 +59,7 @@ gulp.task('customizer:sass', ['customizer:loadConfig'], function() { 'node_modules/motion-ui/src' ] })) - .pipe(gulp.dest('.customizer/css')) + .pipe(gulp.dest(path.join(OUTPUT_DIR, 'css'))) .pipe(cssnano()) .pipe(rename('foundation.min.css')) .pipe(gulp.dest(path.join(OUTPUT_DIR, 'css'))); @@ -72,7 +72,7 @@ gulp.task('customizer:javascript', ['customizer:loadConfig'], function() { return gulp.src(jsPaths) .pipe(babel()) .pipe(concat('foundation.js')) - .pipe(gulp.dest('.customizer/js/vendor')) + .pipe(gulp.dest(path.join(OUTPUT_DIR, 'js/vendor'))) .pipe(uglify()) .pipe(rename('foundation.min.js')) .pipe(gulp.src([