Commit 4883c5cc authored by Nikolay Gromov's avatar Nikolay Gromov

Подправил задачу сборки SVG спрайта (не собирается, если не использован)

parent d49c925b
......@@ -134,6 +134,7 @@ gulp.task('copy:fonts', function () {
// Сборка SVG-спрайта для блока sprite-svg
gulp.task('sprite:svg', function (callback) {
if((pjson.configProject.blocks['sprite-svg']) !== undefined) {
const svgstore = require('gulp-svgstore');
const svgmin = require('gulp-svgmin');
const cheerio = require('gulp-cheerio');
......@@ -163,7 +164,12 @@ gulp.task('sprite:svg', function (callback) {
.pipe(gulp.dest(dirs.srcPath + dirs.blocksDirName + '/sprite-svg/img/'));
}
else {
console.log('---------- Сборка SVG спрайта: нет папки с картинками');
console.log('---------- Сборка SVG спрайта: ОТМЕНА, нет папки с картинками');
callback();
}
}
else {
console.log('---------- Сборка SVG спрайта: ОТМЕНА, блок не используется на проекте');
callback();
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment