<commit_before>const babel = require('gulp-babel');
const cssnano = require('cssnano');
const gulp = require('gulp');
const injectSvg = require('gulp-inject-svg');
const postcss = require('gulp-postcss');
const postcssExtend = require('postcss-extend');
const postcssNested = require('postcss-nested');
const postcsssSimpleVars = require('postcss-simple-vars');
const pug = require('gulp-pug');
const uglify = require('gulp-uglify');

gulp.task('build', () => {
  gulp.src('app/src/pug/*')
    .pipe(pug())
    .pipe(injectSvg())
    .pipe(gulp.dest('app/dist'));

  gulp.src('app/src/css/*')
    .pipe(postcss([postcsssSimpleVars, postcssExtend, postcssNested, cssnano]))
    .pipe(gulp.dest('app/dist'));

  gulp.src('app/src/js/*')
    .pipe(babel({presets: ['es2015']}))
    .pipe(uglify())
    .pipe(gulp.dest('app/dist'));

  gulp.src('app/main.js')
    .pipe(babel({presets: ['es2015']}))
    .pipe(uglify())
    .pipe(gulp.dest('app/dist'));
});

gulp.task('watch', ['build'], () => {
  gulp.watch('app/src/**', ['build']);
});<commit_msg>Reorganize the gulp build/watch flow<commit_after>const babel = require('gulp-babel');
const cssnano = require('cssnano');
const gulp = require('gulp');
const injectSvg = require('gulp-inject-svg');
const postcss = require('gulp-postcss');
const postcssExtend = require('postcss-extend');
const postcssNested = require('postcss-nested');
const postcsssSimpleVars = require('postcss-simple-vars');
const pug = require('gulp-pug');
const uglify = require('gulp-uglify');

gulp.task('build:main', () =>
  gulp.src('app/main.js')
    .pipe(babel({presets: ['es2015']}))
    .pipe(uglify())
    .pipe(gulp.dest('app/dist')));

gulp.task('build:pug', () =>
  gulp.src('app/src/pug/*')
    .pipe(pug())
    .pipe(injectSvg())
    .pipe(gulp.dest('app/dist')));

gulp.task('build:css', () =>
  gulp.src('app/src/css/*')
    .pipe(postcss([postcsssSimpleVars, postcssExtend, postcssNested, cssnano]))
    .pipe(gulp.dest('app/dist')));

gulp.task('build:js', () =>
  gulp.src('app/src/js/*')
    .pipe(babel({presets: ['es2015']}))
    .pipe(uglify())
    .pipe(gulp.dest('app/dist')));

gulp.task('build', ['build:main', 'build:pug', 'build:css', 'build:js']);

gulp.task('default', ['build']);

gulp.task('watch', ['build'], () => {
  gulp.watch('app/src/pug/*.pug', ['build:pug']);
  gulp.watch('app/src/css/*.css', ['build:css']);
  gulp.watch('app/src/js/*.js', ['build:js']);
  gulp.watch('app/main.js', ['build:main']);
});
{'fraction_non_alphanumeric': 0.24756888168557536, 'fraction_numerical': 0.006482982171799027, 'mean_word_length': 4.963768115942029, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '6758747', 'n_tokens_mistral': 971, 'n_tokens_neox': 953, 'n_words': 130}