Answer the question
In order to leave comments, you need to log in
Why doesn't console.log show up like gulp ends a function?
What is the correct way to write console.log('END') after gulp.task completes?
const { src, dest, series } = require('gulp');
const sass = require('gulp-sass');
function OPTcompileSCSS() {
console.log('START');
return src('src/assets/scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(dest('build/test/assets/css/'));
// console.log('END'); // не работает, не отображается в консоли.
}
exports.OPTcompileSCSS = OPTcompileSCSS;
Answer the question
In order to leave comments, you need to log in
You are trying to console.log after the function has exited.
You should wrap the call to the function itself in console.log.
console.log('START')
OPTcompileSCSS()
console.log('END')
console.time('OPTcompileSCSS')
OPTcompileSCSS()
console.timeEnd('OPTcompileSCSS')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question