I
I
iBird Rose2016-08-28 17:56:42
HTML
iBird Rose, 2016-08-28 17:56:42

How to prescribe in Gulp rigger so that auxiliary files are not copied?

I use for include palgin Gulp rigger

gulp.task('htmlrigger', function () { 
  gulp.src('Dev/*.html')
  .pipe(rigger())
  .pipe(gulp.dest('Dist/'))
});

For example, I have index.html and add.html - and I add using //= _add.html
But in the output I get the index.html I need and add.html too. The question actually is how to get rid of add.html at the output

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergey, 2016-08-28
@iiiBird

Here is my version of the task, auxiliary files are not added to build
var src = {
html: ['./src/*.html']
}

gulp.task('html', function() {
    gulp.src(src.html)
        .pipe(rigger())
        .pipe(gulpIf(env !== 'dev', minifyHTML()))
        .pipe(gulp.dest(outputDir))
        .pipe(connect.reload())
});

according to the structure, there is a template folder, in which I connect header.html, footer.html, sidebar.html, etc.
to the page:
//= template/header.html
//= template/sidebar.html
//= template/footer. html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question