mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -05:00
Use template literals in the gulpfile
This commit is contained in:
parent
1d31bc693c
commit
9a01ce94be
1 changed files with 5 additions and 5 deletions
10
gulpfile.js
vendored
10
gulpfile.js
vendored
|
@ -80,16 +80,16 @@ function handleError(err) {
|
||||||
|
|
||||||
// Process sass
|
// Process sass
|
||||||
function processSass(filename) {
|
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(plumber(handleError))
|
||||||
.pipe(sassGlob())
|
.pipe(sassGlob())
|
||||||
.pipe(sass({ outputStyle: sassOutputStyle, includePaths: sassPaths }))
|
.pipe(sass({ outputStyle: sassOutputStyle, includePaths: sassPaths }))
|
||||||
.pipe(postCSS([ autoprefixer(autoprefixerSettings) ]))
|
.pipe(postCSS([ autoprefixer(autoprefixerSettings) ]))
|
||||||
.pipe(concat(filename + ".css"))
|
.pipe(concat(`${filename}.css`))
|
||||||
.pipe(gulp.dest("public/css/"));
|
.pipe(gulp.dest("public/css/"));
|
||||||
|
|
||||||
if (!isProduction) {
|
if (!isProduction) {
|
||||||
css.pipe(browserSync.stream({ match: "**/" + filename + ".css" }));
|
css.pipe(browserSync.stream({ match: `**/${filename}.css` }));
|
||||||
}
|
}
|
||||||
|
|
||||||
return css;
|
return css;
|
||||||
|
@ -104,7 +104,7 @@ function processVue(ouputFilename, inputFile) {
|
||||||
.transform(vueify)
|
.transform(vueify)
|
||||||
.bundle()
|
.bundle()
|
||||||
.on("error", handleError)
|
.on("error", handleError)
|
||||||
.pipe(source(ouputFilename + ".js"))
|
.pipe(source(`${ouputFilename}.js`))
|
||||||
.pipe(buffer());
|
.pipe(buffer());
|
||||||
|
|
||||||
if (isProduction) {
|
if (isProduction) {
|
||||||
|
@ -118,7 +118,7 @@ function processVue(ouputFilename, inputFile) {
|
||||||
function processJavaScript(ouputFilename, inputFiles, es6) {
|
function processJavaScript(ouputFilename, inputFiles, es6) {
|
||||||
const javascript = gulp.src(inputFiles)
|
const javascript = gulp.src(inputFiles)
|
||||||
.pipe(plumber(handleError))
|
.pipe(plumber(handleError))
|
||||||
.pipe(concat(ouputFilename + ".js"));
|
.pipe(concat(`${ouputFilename}.js`));
|
||||||
|
|
||||||
if (es6) {
|
if (es6) {
|
||||||
javascript.pipe(babel());
|
javascript.pipe(babel());
|
||||||
|
|
Loading…
Reference in a new issue