Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
watch(tmplFolder + '/**/*', function(e) {
console.log(e.path);
if (fs.existsSync(e.path)) {
combineTool.processFile(e.path);
} else {
combineTool.removeFile(e.path);
}
});
});
watch('./tmpl/**/*', e => {
if (fs.existsSync(e.path)) {
combineTool.processFile(e.path).catch(ex => {
console.log('ex', ex);
});
} else {
combineTool.removeFile(e.path);
}
});
});
console.log(e.path);
if (path.extname(e.path) == '.scss') {
if (config.incrementBuild) {
return gulp.src([e.path])
.pipe($.sass().on('error', $.sass.logError))
.pipe($.autoprefixer(autoPrefixerConfig))
.pipe(gulp.dest(path.dirname(e.path)));
} else {
runSequence('sass');
}
return;
}
if (fs.existsSync(e.path)) {
combineTool.processFile(e.path);
} else {
combineTool.removeFile(e.path);
}
});
});
watch(tmplFolder + '/**/*', function(e) {
console.log(e.path);
if (fs.existsSync(e.path)) {
combineTool.processFile(e.path);
} else {
combineTool.removeFile(e.path);
}
});
});