<commit_before>// var gulp = require('gulp');

var handleError = function (err) {
    var colors = gutil.colors;
    console.log('\n')
    gutil.log(colors.red('Error!'))
    gutil.log('fileName: ' + colors.red(err.fileName))
    gutil.log('lineNumber: ' + colors.red(err.lineNumber))
    gutil.log('message: ' + err.message)
    gutil.log('plugin: ' + colors.yellow(err.plugin))
}
var combiner = require('stream-combiner2')
var gutil = require('gulp-util')
var changed = require('gulp-changed');

var gulp = require('gulp'),
    sass = require('gulp-ruby-sass'),
    autoprefixer = require('gulp-autoprefixer'),
    minifycss = require('gulp-minify-css'),
    //jshint = require('gulp-jshint'),
    uglify = require('gulp-uglify'),
    imagemin = require('gulp-imagemin'),
    rename = require('gulp-rename'),
    clean = require('gulp-clean'),
    concat = require('gulp-concat'),
    notify = require('gulp-notify'),
    cache = require('gulp-cache'),
    livereload = require('gulp-livereload');


    var DEST = 'dist/AirUI';
    var SRC  = 'src/module/**/*.js'

gulp.task('default', function() {
    gulp.src(SRC)
    // .pipe(jshint('.jshintrc'))
    // .pipe(jshint.reporter('default'))
    .pipe(changed(DEST, {hasChanged: changed.compareSha1Digest}))
    .pipe(gulp.dest(DEST))
    .pipe(rename({suffix: '.min'}))
    .pipe(uglify())
    .pipe(gulp.dest(DEST))
    .pipe(notify({ message: 'Scripts task complete' }));



    // var combined = combiner.obj([
    //      gulp.src(SRC),
    //      changed(DEST),
    //      gulp.dest(DEST),
    //      rename({suffix: '.min'}),
    //      uglify(),
    //      gulp.dest(DEST),
    //     notify({ message: 'Scripts task complete' })
    //    ]);
    //
    //
    //     combined.on('error', handleError)
});
<commit_msg>add uglify error catch<commit_after>// var gulp = require('gulp');

var handleError = function (err) {
    var colors = gutil.colors;
    console.log('\n')
    gutil.log(colors.red('Error!'))
    gutil.log('fileName: ' + colors.red(err.fileName))
    gutil.log('lineNumber: ' + colors.red(err.lineNumber))
    gutil.log('message: ' + err.message)
    gutil.log('plugin: ' + colors.yellow(err.plugin))
}
var combiner = require('stream-combiner2')
var gutil = require('gulp-util')
var changed = require('gulp-changed');

var gulp = require('gulp'),
    sass = require('gulp-ruby-sass'),
    autoprefixer = require('gulp-autoprefixer'),
    minifycss = require('gulp-minify-css'),
    //jshint = require('gulp-jshint'),
    uglify = require('gulp-uglify'),
    imagemin = require('gulp-imagemin'),
    rename = require('gulp-rename'),
    clean = require('gulp-clean'),
    concat = require('gulp-concat'),
    notify = require('gulp-notify'),
    cache = require('gulp-cache'),
    livereload = require('gulp-livereload');


    var DEST = 'dist/AirUI';
    var SRC  = 'src/module/**/*.js'

gulp.task('default', function() {
    gulp.src(SRC)
    // .pipe(jshint('.jshintrc'))
    // .pipe(jshint.reporter('default'))
    .pipe(changed(DEST, {hasChanged: changed.compareSha1Digest}))
    .pipe(gulp.dest(DEST))
    .pipe(rename({suffix: '.min'}))
    .pipe(uglify().on('error', gutil.log))
    .pipe(gulp.dest(DEST))
    .pipe(notify({ message: 'Scripts task complete' }));



    // var combined = combiner.obj([
    //      gulp.src(SRC),
    //      changed(DEST),
    //      gulp.dest(DEST),
    //      rename({suffix: '.min'}),
    //      uglify(),
    //      gulp.dest(DEST),
    //     notify({ message: 'Scripts task complete' })
    //    ]);
    //
    //
    //     combined.on('error', handleError)
});

{'fraction_non_alphanumeric': 0.20016657412548583, 'fraction_numerical': 0.001110494169905608, 'mean_word_length': 2.8951351351351353, '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': '1395518', 'n_tokens_mistral': 1301, 'n_tokens_neox': 1290, 'n_words': 200}