From a81d4e106088b159a4cc4905654420f8bfff2f91 Mon Sep 17 00:00:00 2001 From: Geoff Kimball Date: Tue, 2 Feb 2016 11:12:45 -0800 Subject: [PATCH] In testing Gulpfile, change isProduction to PRODUCTION, and add missing comments --- testing/gulpfile.babel.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testing/gulpfile.babel.js b/testing/gulpfile.babel.js index 803e5008..7212dd33 100644 --- a/testing/gulpfile.babel.js +++ b/testing/gulpfile.babel.js @@ -11,11 +11,11 @@ import inky from 'inky'; const $ = plugins(); // Look for the --production flag -const isProduction = !!(yargs.argv.production); +const PRODUCTION = !!(yargs.argv.production); // Only inline if the --production flag is enabled var buildTasks = [clean, pages, sass, images]; -if (isProduction) buildTasks.push(inline); +if (PRODUCTION) buildTasks.push(inline); // Build the "dist" folder by running all of the above tasks gulp.task('build', @@ -44,6 +44,7 @@ function pages() { .pipe(gulp.dest('dist')); } +// Reset Panini's cache of layouts and partials function resetPages(done) { panini.refresh(); done(); @@ -52,9 +53,9 @@ function resetPages(done) { // Compile Sass into CSS function sass() { return gulp.src('src/assets/scss/app.scss') - .pipe($.if(!isProduction, $.sourcemaps.init())) + .pipe($.if(!PRODUCTION, $.sourcemaps.init())) .pipe($.sass().on('error', $.sass.logError)) - .pipe($.if(!isProduction, $.sourcemaps.write())) + .pipe($.if(!PRODUCTION, $.sourcemaps.write())) .pipe(gulp.dest('dist/css')); } @@ -90,6 +91,7 @@ function watch() { gulp.watch('src/img/**/*', gulp.series(images, browser.reload)); } +// Inlines CSS into HTML, adds media query CSS into the