<commit_before>/* eslint arrow-body-style: 0 */

const browserify = require('browserify');
const babelify = require('babelify');
const buffer = require('vinyl-buffer');
const del = require('del');
const source = require('vinyl-source-stream');

const gulp = require('gulp');
const $ = require('gulp-load-plugins')({
  rename: {
    'gulp-uglify': 'minifyJs',
    'gulp-cssnano': 'minifyCss',
  },
});

const DIR_BUILD = 'dist';
const DIR_SOURCE = 'src';

const OPTIONS_BABEL = {
  presets: ['es2015', 'es2017'],
  plugins: ['transform-runtime'],
};

const paths = {
  scripts: {
    src: `${DIR_SOURCE}/scripts/**/*.js`,
    entry: `${DIR_SOURCE}/scripts/Taggd.js`,
    dest: DIR_BUILD,
  },
  styles: {
    src: `${DIR_SOURCE}/styles/**/*.css`,
    dest: DIR_BUILD,
  },
};

gulp.task('clean', () => {
  return del(DIR_BUILD);
});

gulp.task('build:scripts', () => {
  return browserify()
    .transform(babelify, OPTIONS_BABEL)
    .require(paths.scripts.entry, { entry: true })
    .bundle()
    .pipe(source('taggd.js'))
    .pipe(buffer())
    .pipe(gulp.dest(paths.scripts.dest))

    .pipe($.sourcemaps.init({ loadMaps: true }))
    .pipe($.minifyJs())
    .pipe($.rename('taggd.min.js'))
    .pipe($.sourcemaps.write('.'))
    .pipe(gulp.dest(paths.scripts.dest));
});

gulp.task('build:styles', () => {
  return gulp.src(paths.styles.src)
    .pipe($.sourcemaps.init())
    .pipe($.minifyCss())
    .pipe($.sourcemaps.write('.'))
    .pipe(gulp.dest(paths.styles.dest));
});

gulp.task('build', gulp.series('clean', gulp.parallel('build:scripts', 'build:styles')));
gulp.task('default', gulp.series('build'));

gulp.task('watch', gulp.series('build', () => {
  gulp.watch(paths.scripts.src, 'build:scripts');
  gulp.watch(paths.styles.src, 'build:styles');
}));<commit_msg>Remove error for newer gulp-cli versions<commit_after>/* eslint arrow-body-style: 0 */

const browserify = require('browserify');
const babelify = require('babelify');
const buffer = require('vinyl-buffer');
const del = require('del');
const source = require('vinyl-source-stream');

const gulp = require('gulp');
const $ = require('gulp-load-plugins')({
  rename: {
    'gulp-uglify': 'minifyJs',
    'gulp-cssnano': 'minifyCss',
  },
});

const DIR_BUILD = 'dist';
const DIR_SOURCE = 'src';

const OPTIONS_BABEL = {
  presets: ['es2015', 'es2017'],
  plugins: ['transform-runtime'],
};

const paths = {
  scripts: {
    src: `${DIR_SOURCE}/scripts/**/*.js`,
    entry: `${DIR_SOURCE}/scripts/Taggd.js`,
    dest: DIR_BUILD,
  },
  styles: {
    src: `${DIR_SOURCE}/styles/**/*.css`,
    dest: DIR_BUILD,
  },
};

gulp.task('clean', () => {
  return del(DIR_BUILD);
});

gulp.task('build:scripts', () => {
  return browserify()
    .transform(babelify, OPTIONS_BABEL)
    .require(paths.scripts.entry, { entry: true })
    .bundle()
    .pipe(source('taggd.js'))
    .pipe(buffer())
    .pipe(gulp.dest(paths.scripts.dest))

    .pipe($.sourcemaps.init({ loadMaps: true }))
    .pipe($.minifyJs())
    .pipe($.rename('taggd.min.js'))
    .pipe($.sourcemaps.write('.'))
    .pipe(gulp.dest(paths.scripts.dest));
});

gulp.task('build:styles', () => {
  return gulp.src(paths.styles.src)
    .pipe($.sourcemaps.init())
    .pipe($.minifyCss())
    .pipe($.sourcemaps.write('.'))
    .pipe(gulp.dest(paths.styles.dest));
});

gulp.task('build', gulp.series('clean', gulp.parallel('build:scripts', 'build:styles')));
gulp.task('default', gulp.series('build'));

gulp.task('watch', gulp.series('build', () => {
  gulp.watch(paths.scripts.src, gulp.series('build:scripts'));
  gulp.watch(paths.styles.src, gulp.series('build:styles'));
}));
{'fraction_non_alphanumeric': 0.22753663256842688, 'fraction_numerical': 0.0049764998617638926, 'mean_word_length': 4.131914893617021, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4684579', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1336, 'n_words': 199}