From 9a01ce94be94e80391cd39a0f74e22732646671e Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Mon, 23 Apr 2018 23:08:50 -0400 Subject: [PATCH] Use template literals in the gulpfile --- gulpfile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e65106a..361c9bd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -80,16 +80,16 @@ function handleError(err) { // Process sass function processSass(filename) { - const css = gulp.src("resources/assets/sass/" + filename + ".scss") + const css = gulp.src(`resources/assets/sass/${filename}.scss`) .pipe(plumber(handleError)) .pipe(sassGlob()) .pipe(sass({ outputStyle: sassOutputStyle, includePaths: sassPaths })) .pipe(postCSS([ autoprefixer(autoprefixerSettings) ])) - .pipe(concat(filename + ".css")) + .pipe(concat(`${filename}.css`)) .pipe(gulp.dest("public/css/")); if (!isProduction) { - css.pipe(browserSync.stream({ match: "**/" + filename + ".css" })); + css.pipe(browserSync.stream({ match: `**/${filename}.css` })); } return css; @@ -104,7 +104,7 @@ function processVue(ouputFilename, inputFile) { .transform(vueify) .bundle() .on("error", handleError) - .pipe(source(ouputFilename + ".js")) + .pipe(source(`${ouputFilename}.js`)) .pipe(buffer()); if (isProduction) { @@ -118,7 +118,7 @@ function processVue(ouputFilename, inputFile) { function processJavaScript(ouputFilename, inputFiles, es6) { const javascript = gulp.src(inputFiles) .pipe(plumber(handleError)) - .pipe(concat(ouputFilename + ".js")); + .pipe(concat(`${ouputFilename}.js`)); if (es6) { javascript.pipe(babel());