<commit_before>'use strict'

var gulp = require('gulp'),
    watch = require('gulp-watch'),
    prefixer = require('gulp-autoprefixer'),
    // uglify = require('gulp-uglify'),
    sass = require('gulp-sass'),
    sourcemaps = require('gulp-sourcemaps'),
    rigger = require('gulp-rigger'),
    cssmin = require('gulp-clean-css'),
    imagemin = require('gulp-imagemin'),
    rimraf = require('rimraf'),
    browserSync = require('browser-sync'),
    reload = browserSync.reload

var path = {
    build: {
      html: 'build/',
      js: 'build/js',
      css: 'build/css',
      img: 'build/img',
      fonts: 'build/fonts',
	    data: 'build/data'
    },
    src: {
      html: 'src/**/*.html',
      js: 'src/js/*.js',
      styles: 'src/styles/index.scss',
      img: 'src/img/**/*.*',
      fonts: 'src/fonts/**/*.*',
	    data: 'src/data/*.*'
    },
    watch: {
      html: 'src/**/*.html',
      js: 'src/js/**/*.js',
      styles: 'src/styles/**/*.scss',
      img: 'src/img/**/*.*',
      fonts: 'src/fonts/**/*.*',
	    data: 'src/data/*.*'
    },
    clean: './build'
}

var config = {
    server: {
      baseDir: './build'
    },
    tunnel: true,
    host: 'localhost',
    port: 9000,
    logPrefix: 'Hero'
}

gulp.task('html:build', function () {
  gulp.src(path.src.html)
      .pipe(rigger())
      .pipe(gulp.dest(path.build.html))
      .pipe(reload({stream: true}))
})
gulp.task('js:build', function () {
  gulp.src(path.src.js)
      .pipe(rigger())
      .pipe(sourcemaps.init())
      // .pipe(uglify())
      .pipe(sourcemaps.write())
      .pipe(gulp.dest(path.build.js))
      .pipe(reload({stream: true}))
})
gulp.task('data:build', function () {
	gulp.src(path.src.data)
		.pipe(gulp.dest(path.build.data))
		.pipe(reload({stream: true}))
})
gulp.task('styles:build', function () {
  gulp.src(path.src.styles)
      .pipe(sourcemaps.init())
      .pipe(sass())
      .pipe(prefixer())
      .pipe(cssmin())
      .pipe(sourcemaps.write())
      .pipe(gulp.dest(path.build.css))
      .pipe(reload({stream: true}))
})
gulp.task('image:build', function () {
  gulp.src(path.src.img)
      .pipe(imagemin({
        progressive: true,
        svgoPlugins: [{removeViewBox: false}],
        interlaced: true
      }))
      .pipe(gulp.dest(path.build.img))
      .pipe(reload({stream: true}))
})
gulp.task('fonts:build', function () {
  gulp.src(path.src.fonts)
      .pipe(gulp.dest(path.build.fonts))
      .pipe(reload({stream: true}))
})<commit_msg>update gulpfile.js<commit_after>'use strict'

var gulp = require('gulp'),
    watch = require('gulp-watch'),
    prefixer = require('gulp-autoprefixer'),
    // uglify = require('gulp-uglify'),
    sass = require('gulp-sass'),
    sourcemaps = require('gulp-sourcemaps'),
    rigger = require('gulp-rigger'),
    cssmin = require('gulp-clean-css'),
    imagemin = require('gulp-imagemin'),
    rimraf = require('rimraf'),
    browserSync = require('browser-sync'),
    reload = browserSync.reload

var path = {
    build: {
      html: 'build/',
      js: 'build/js',
      css: 'build/css',
      img: 'build/img',
      fonts: 'build/fonts',
	    data: 'build/data'
    },
    src: {
      html: 'src/**/*.html',
      js: 'src/js/*.js',
      styles: 'src/styles/index.scss',
      img: 'src/img/**/*.*',
      fonts: 'src/fonts/**/*.*',
	    data: 'src/data/*.*'
    },
    watch: {
      html: 'src/**/*.html',
      js: 'src/js/**/*.js',
      styles: 'src/styles/**/*.scss',
      img: 'src/img/**/*.*',
      fonts: 'src/fonts/**/*.*',
	    data: 'src/data/*.*'
    },
    clean: './build'
}

var config = {
    server: {
      baseDir: './build'
    },
    tunnel: true,
    host: 'localhost',
    port: 9000,
    logPrefix: 'Hero'
}

gulp.task('html:build', function () {
  return gulp.src(path.src.html)
      .pipe(rigger())
      .pipe(gulp.dest(path.build.html))
      .pipe(reload({stream: true}))
})
gulp.task('js:build', function () {
  return gulp.src(path.src.js)
      .pipe(rigger())
      .pipe(sourcemaps.init())
      // .pipe(uglify())
      .pipe(sourcemaps.write())
      .pipe(gulp.dest(path.build.js))
      .pipe(reload({stream: true}))
})
gulp.task('data:build', function () {
   return gulp.src(path.src.data)
	.pipe(gulp.dest(path.build.data))
	.pipe(reload({stream: true}))
})
gulp.task('styles:build', function () {
   return gulp.src(path.src.styles)
      .pipe(sourcemaps.init())
      .pipe(sass())
      .pipe(prefixer())
      .pipe(cssmin())
      .pipe(sourcemaps.write())
      .pipe(gulp.dest(path.build.css))
      .pipe(reload({stream: true}))
})
gulp.task('image:build', function () {
   return gulp.src(path.src.img)
      .pipe(imagemin({
        progressive: true,
        svgoPlugins: [{removeViewBox: false}],
        interlaced: true
      }))
      .pipe(gulp.dest(path.build.img))
      .pipe(reload({stream: true}))
})
gulp.task('fonts:build', function () {
   return gulp.src(path.src.fonts)
      .pipe(gulp.dest(path.build.fonts))
      .pipe(reload({stream: true}))
})
{'fraction_non_alphanumeric': 0.21705271565495207, 'fraction_numerical': 0.001597444089456869, 'mean_word_length': 2.5424328147100423, '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': '6381512', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1835, 'n_words': 281}