Папка назначения в моем задании gulp для вывода критического css не работает
У меня есть следующее задание gulp и я запускаю его в папку "Тема" для WordPress:
gulp.task('critical-css', function () {
return gulp.src('./style.css')
.pipe(criticalCss({
out: 'critical.php', // output file name
url: 'http://localhost/dimoco/',
// url from where we want penthouse to extract critical styles
width: 1400, // max window width for critical media queries
height: 900, // max window height for critical media queries
userAgent: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
// pretend to be googlebot when grabbing critical page styles.
}))
.pipe(cssNano({
safe:true // this isn't required, but I've included cssNano to minify the output file
}))
.pipe(gulp.dest('./template-parts/')); // destination folder for the output file
});
Когда я запускаю задачу, пишется файл с критическим css под названием "themenamecritical.php". Но я подумал с кодом gulp: .pipe(gulp.dest('./template-parts/')); файл с именем crit.php будет записан в папку theme/template-parts/
Почему это не работает?
С наилучшими пожеланиями