<commit_before>var gulp = require('gulp'),
  plugins = require('gulp-load-plugins')();

var paths = {
  css_src: ['src/css/styles.css'],
  css_dist: 'dist/css',
  images_src: ['src/images/*.{png,jpg}'],
  images_dist: 'dist/images',
  content: ['src/index.html'],
  dist: 'dist'
};

gulp.task('clean-css', function(){
  gulp.src(paths.css_src)
    .pipe(plugins.cleanCss())
    .pipe(gulp.dest(paths.css_dist));
});

gulp.task('minify-html', function(){
  gulp.src(paths.content)
    .pipe(plugins.minifyHtml({
      empty: true,
      quotes: true
    }))
    .pipe(gulp.dest(paths.dist))
});

gulp.task('prep-images', function(){
  gulp.src(paths.images_src)
    .pipe(plugins.responsive({
      '*.png': {
        format: 'jpeg',
        width: 330,
        rename: {
          suffix: '-xs',
          extname: '.jpg'
        }
      },
      'working.png': [
        {
          format: 'jpeg',
          width: 720,
          height: 288,
          rename: {
            suffix: '-sm',
            extname: '.jpg'
          }
        }, {
          format: 'jpeg',
          width: 940,
          height: 376,
          rename: {
            suffix: '-md',
            extname: '.jpg'
          }
        }, {
          format: 'jpeg',
          width: 1140,
          height: 456,
          rename: {
            suffix: '-lg',
            extname: '.jpg'
          }
        }
      ]
    }))
    .pipe(gulp.dest(paths.images_dist));
});

gulp.task('watch', function(){
  gulp.watch(paths.css_src, ['clean-css']);
  gulp.watch(paths.content, ['minify-html']);
  gulp.watch(paths.images_src, ['prep-images']);
});<commit_msg>Gulp now generating all(?) the images I need.<commit_after>var gulp = require('gulp'),
  plugins = require('gulp-load-plugins')();

var paths = {
  css_src: ['src/css/styles.css'],
  css_dist: 'dist/css',
  images_src: ['src/images/*.{png,jpg}'],
  images_dist: 'dist/images',
  content: ['src/index.html'],
  dist: 'dist'
};

gulp.task('clean-css', function(){
  gulp.src(paths.css_src)
    .pipe(plugins.cleanCss())
    .pipe(gulp.dest(paths.css_dist));
});

gulp.task('minify-html', function(){
  gulp.src(paths.content)
    .pipe(plugins.minifyHtml({
      empty: true,
      quotes: true
    }))
    .pipe(gulp.dest(paths.dist))
});

gulp.task('prep-images', function(){
  gulp.src(paths.images_src)
    .pipe(plugins.responsive({
      '*.png': {
        width: 330,
        rename: {
          suffix: '-xs',
          extname: '.jpg'
        }
      },
      'working.png': [
        {
          width: 720,
          height: 288,
          rename: {
            suffix: '-sm',
            extname: '.jpg'
          }
        }, {
          width: 940,
          height: 376,
          rename: {
            suffix: '-md',
            extname: '.jpg'
          }
        }, {
          width: 1140,
          height: 456,
          rename: { extname: '.jpg' }
        }
      ],
      'survivr.png': {
        width: 568,
        rename: { extname: '.jpg' }
      },
      'udacitask-part2.png': {
        width: 568,
        rename: { extname: '.jpg' }
      },
      'animal-trading-cards.png': [
        {
          width: 220,
          height: 174,
          rename: {
            suffix: '-sm',
            extname: '.jpg'
          }
        }, {
          width: 293,
          height: 233,
          rename: {
            suffix: '-md',
            extname: '.jpg'
          }
        }, {
          width: 360,
          height: 285.47,
          rename: {
            suffix: '-lg',
            extname: '.jpg'
          }
        }, { // For the modal version of the taller image (except "-xs")
          rename: { extname: '.jpg' }
        }
      ]
    }))
    .pipe(gulp.dest(paths.images_dist));
});

gulp.task('watch', function(){
  gulp.watch(paths.css_src, ['clean-css']);
  gulp.watch(paths.content, ['minify-html']);
  gulp.watch(paths.images_src, ['prep-images']);
});
{'fraction_non_alphanumeric': 0.18091603053435115, 'fraction_numerical': 0.018066157760814248, 'mean_word_length': 1.6224149432955304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5120386', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1328, 'n_words': 230}