Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 636 Bytes

keep-some-html-files-in-dist.md

File metadata and controls

31 lines (26 loc) · 636 Bytes

How can exclude some HTML files from being added to the Angular cache?

  1. Blacklist the .seo.html files during partials task
  2. Copy the seo files afterwards into dist
gulp.task('partials', function () {
  return gulp.src([
      'src/**/*.html',
      '!src/**/*.seo.html'
    ])
    .pipe(gulp.dest('.tmp/src'))
    .pipe($.size());
});

gulp.task('copy', function () {
  return gulp.src([
      'src/**/*.seo.html'
    ])
    .pipe(gulp.dest('dist/'));
});

gulp.task('build', [
  'partials',
  'copy'
], function() {
    gulp.start('deploy');
});