<commit_before>'use strict';

var readFileSync = require('fs').readFileSync;

var gulp = require('gulp');

var concat = require('gulp-concat');
var connect = require('gulp-connect');
var cssmin = require('gulp-cssmin');
var del = require('del');
var gulpif = require('gulp-if');
var htmlmin = require('gulp-htmlmin');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
var rev = require('gulp-rev');
var revReplace = require('gulp-rev-replace');
var sass = require('gulp-sass');
var shell = require('gulp-shell');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var util = require('gulp-util');
var watch = require('glob-watcher');
var webpack = require('webpack-stream');

var debounce = require('lodash.debounce');

var production = false;
var webserver = false;

var htmlminOpt = {
  collapseWhitespace: true,
  conservativeCollapse: true,
  removeComments: true,
  removeCommentsFromCDATA: true,
  caseSensitive: true,
  minifyJS: true,
  minifyCSS: true,
  minifyURLs: true
}

var fontList = [
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.eot',
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff',
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2',
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.ttf',
];

var styleList = [
  './lib/*.css',
  'node_modules/codemirror/lib/codemirror.css',
  'node_modules/codemirror/theme/material.css'
];

function buildjs() {
  return gulp.src('./ts/main.ts')
      .pipe(gulpif(!production, plumber()))
      .pipe(webpack(require('./webpack.config'))) // Handles source map
      .pipe(rev()) // TODO ignore chunk file
      .pipe(gulp.dest('./build/js'))
      .pipe(rev.manifest({
        path: './build/rev-manifest.json',
        base: './build',
        merge: true
      }))<commit_msg>Using uglify for production build. Cssmin still breaks mdl checkboxs<commit_after>'use strict';

var readFileSync = require('fs').readFileSync;

var gulp = require('gulp');

var concat = require('gulp-concat');
var connect = require('gulp-connect');
var cssmin = require('gulp-cssmin');
var del = require('del');
var gulpif = require('gulp-if');
var htmlmin = require('gulp-htmlmin');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
var rev = require('gulp-rev');
var revReplace = require('gulp-rev-replace');
var sass = require('gulp-sass');
var shell = require('gulp-shell');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var util = require('gulp-util');
var watch = require('glob-watcher');
var webpack = require('webpack-stream');

var debounce = require('lodash.debounce');

var production = false;
var webserver = false;

var htmlminOpt = {
  collapseWhitespace: true,
  conservativeCollapse: true,
  removeComments: true,
  removeCommentsFromCDATA: true,
  caseSensitive: true,
  minifyJS: true,
  minifyCSS: true,
  minifyURLs: true
}

var fontList = [
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.eot',
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff',
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2',
  'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.ttf',
];

var styleList = [
  './lib/*.css',
  'node_modules/codemirror/lib/codemirror.css',
  'node_modules/codemirror/theme/material.css'
];

function buildjs() {
  return gulp.src('./ts/main.ts')
      .pipe(gulpif(!production, plumber()))
      .pipe(webpack(require('./webpack.config'))) // Handles source map
      .pipe(gulpif(production, uglify()))
      .pipe(rev()) // TODO ignore chunk file
      .pipe(gulp.dest('./build/js'))
      .pipe(rev.manifest({
        path: './build/rev-manifest.json',
        base: './build',
        merge: true
      }))
{'fraction_non_alphanumeric': 0.16395558998192616, 'fraction_numerical': 0.0005163955589981926, 'mean_word_length': 4.4872521246458925, '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': '2697603', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1293, 'n_words': 251}