美文网首页
如何将部分 HTML 排除在 cache 之外

如何将部分 HTML 排除在 cache 之外

作者: Transnet2014 | 来源:发表于2017-04-19 18:53 被阅读9次

返回导航

#295

  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');
});

返回导航

相关文章

网友评论

      本文标题:如何将部分 HTML 排除在 cache 之外

      本文链接:https://www.haomeiwen.com/subject/jvphzttx.html