Answer the question
In order to leave comments, you need to log in
gulp. The project is being built, but the build folder is empty. Why?
Hello! I'm working on a new project, the assembler is Gulp. I ran into some incomprehensible problem that I had not encountered before - the project is being built (judging by the terminal in Webstorm), but the final folder with the built project remains empty. The rigger plugin is used to include html files. Below is the gulpfile code, so far it only contains a task for building html.
'use strict';
var gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
rigger = require('gulp-rigger'),
cssmin = require('gulp-minify-css'),
imagemin = require('gulp-imagemin'),
pngquant = require('imagemin-pngquant'),
rimraf = require('rimraf'),
browserSync = require("browser-sync"),
reload = browserSync.reload;
var path = {
build: {
html: 'build/'
},
src: {
html: 'src/*.html'
},
watch: {
html: 'src/**/*.html'
},
clean: './build'
};
gulp.task('html:build', function () {
gulp.src(path.src.html) //Выберем файлы по нужному пути
.pipe(rigger()) //Прогоним через rigger
.pipe(gulp.dest(path.build.html)) //Выплюнем их в папку build
.pipe(reload({stream: true})); //И перезагрузим наш сервер для обновлений
});
Answer the question
In order to leave comments, you need to log in
I did not see correctly prescribed paths, exceptpath.clean
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question