<commit_before>/**
 * Configuration
 */
var config = {
  host: 'devbox.dev',
  subdirectory: '/perfundo/demo',
  styles: {
    destination: 'dist',
    watchDirectories: ['scss/**/*']
  },
  scripts: {
    destination: 'dist',
    destinationFileName: 'index.js',
    browserifyEntries: ['js/index.js'],
    watchDirectories: ['js/**/*']
  },
  sassOptions: {
    precision: 7
  }
};

/**
 * Plugins
 */
var browserSync  = require('browser-sync').create();
var browserify   = require('browserify');
var del          = require('del');
var eyeglass     = require('eyeglass');
var fs           = require('fs');
var gulp         = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var cssnano      = require('gulp-cssnano');
var minifyCss    = require('gulp-minify-css');
var rename       = require('gulp-rename');
var sass         = require('gulp-sass');
var sourcemaps   = require('gulp-sourcemaps');
var uglify       = require('gulp-uglify');
var buffer       = require('vinyl-buffer');
var source       = require('vinyl-source-stream');

/**
 * Styles
 */
// Build css from scss source files.
gulp.task('styles:build', ['clean:styles'], function () {
  // Use the watch directories config variable to define the src directories.
  var srcDirectories = [];
  config.styles.watchDirectories.forEach(function (value) {
    srcDirectories.push(value + '.scss');
  });
  return gulp.src(srcDirectories)
    .pipe(sourcemaps.init())
    .pipe(sass(eyeglass(config.sassOptions)).on('error', sass.logError))
    .pipe(autoprefixer())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(config.styles.destination))
    .pipe(browserSync.stream());
});

// Minify and optimize the css code generated by the build process.
gulp.task('styles:minify', ['styles:build'], function () {
  return gulp.src(config.styles.destination + '/*.css')
    .pipe(minifyCss())
    .pipe(cssnano())
    .pipe(rename(function (path) {
      path.basename += '.min';
    }))
    .pipe(gulp.dest(config.styles.destination))
    .pipe(browserSync.stream());
});

/**
 * Scripts
 */
// Bundle js resources with browserify and create a minified output file.
gulp.task('scripts:build', ['clean:scripts'], function () {
  // Set up the browserify instance.
  var b = browserify({
    entries: config.scripts.browserifyEntries,
    debug: true
  });

  return b.bundle()
    .pipe(source(config.scripts.destinationFileName))
    .pipe(buffer())
    //.pipe(uglify())
    .pipe(gulp.dest(config.scripts.destination))
    .pipe(browserSync.stream());
});

/**
 * Clean
 *
 * Remove compiled files before regenerating them.
 */
gulp.task('clean:styles', function () {
  return del([
    config.styles.destination + '/**/*.css'
  ]);
});

gulp.task('clean:scripts', function () {<commit_msg>reanable the javascript minifying build step and output a separate unminified javascript file<commit_after>/**
 * Configuration
 */
var config = {
  host: 'devbox.dev',
  subdirectory: '/perfundo/demo',
  styles: {
    destination: 'dist',
    watchDirectories: ['scss/**/*']
  },
  scripts: {
    destination: 'dist',
    destinationFileName: 'index.js',
    browserifyEntries: ['js/index.js'],
    watchDirectories: ['js/**/*']
  },
  sassOptions: {
    precision: 7
  }
};

/**
 * Plugins
 */
var browserSync  = require('browser-sync').create();
var browserify   = require('browserify');
var del          = require('del');
var eyeglass     = require('eyeglass');
var fs           = require('fs');
var gulp         = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var cssnano      = require('gulp-cssnano');
var minifyCss    = require('gulp-minify-css');
var rename       = require('gulp-rename');
var sass         = require('gulp-sass');
var sourcemaps   = require('gulp-sourcemaps');
var uglify       = require('gulp-uglify');
var buffer       = require('vinyl-buffer');
var source       = require('vinyl-source-stream');

/**
 * Styles
 */
// Build css from scss source files.
gulp.task('styles:build', ['clean:styles'], function () {
  // Use the watch directories config variable to define the src directories.
  var srcDirectories = [];
  config.styles.watchDirectories.forEach(function (value) {
    srcDirectories.push(value + '.scss');
  });
  return gulp.src(srcDirectories)
    .pipe(sourcemaps.init())
    .pipe(sass(eyeglass(config.sassOptions)).on('error', sass.logError))
    .pipe(autoprefixer())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(config.styles.destination))
    .pipe(browserSync.stream());
});

// Minify and optimize the css code generated by the build process.
gulp.task('styles:minify', ['styles:build'], function () {
  return gulp.src(config.styles.destination + '/*.css')
    .pipe(minifyCss())
    .pipe(cssnano())
    .pipe(rename(function (path) {
      path.basename += '.min';
    }))
    .pipe(gulp.dest(config.styles.destination))
    .pipe(browserSync.stream());
});

/**
 * Scripts
 */
// Bundle js resources with browserify and create a minified output file.
gulp.task('scripts:build', ['clean:scripts'], function () {
  // Set up the browserify instance.
  var b = browserify({
    entries: config.scripts.browserifyEntries,
    debug: true
  });

  return b.bundle()
    .pipe(source(config.scripts.destinationFileName))
    .pipe(buffer())
    .pipe(gulp.dest(config.scripts.destination))
    .pipe(uglify())
    .pipe(rename(function (path) {
      path.basename += '.min';
    }))
    .pipe(gulp.dest(config.scripts.destination))
    .pipe(browserSync.stream());
});

/**
 * Clean
 *
 * Remove compiled files before regenerating them.
 */
gulp.task('clean:styles', function () {
  return del([
    config.styles.destination + '/**/*.css'
  ]);
});

gulp.task('clean:scripts', function () {
{'fraction_non_alphanumeric': 0.17385233024960725, 'fraction_numerical': 0.00034910106475824753, 'mean_word_length': 3.483568075117371, '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': '3343797', 'n_tokens_mistral': 1835, 'n_tokens_neox': 1820, 'n_words': 379}