<commit_before>import gulp from 'gulp'
import babelify from 'babelify'
import browserSync from 'browser-sync'
import browserify from 'browserify'
import browserifyShim from 'browserify-shim'
import rename from 'gulp-rename'
import stylus from 'gulp-stylus'
import concat from 'gulp-concat'
import jade from 'gulp-jade'
import es from 'event-stream'
import rimraf from 'rimraf'
import ghPages from 'gulp-gh-pages'
import autoprefixer from 'gulp-autoprefixer'
import sourcemaps from 'gulp-sourcemaps'
import imagemin from 'gulp-imagemin'
import watch from 'gulp-watch'
import uglify from 'gulp-uglify'
import resrc from 'gulp-resrc'
import condition from 'gulp-if'
import header from 'gulp-header'
import plumber from 'gulp-plumber'
import source from 'vinyl-source-stream'
import ngAnnotate from 'gulp-ng-annotate'
import gutil from 'gulp-util'
import eslint from 'gulp-eslint'

const PRODUCTION = process.env.NODE_ENV && process.env.NODE_ENV.toLowerCase() === 'production';
const DIST = './dist'

gulp.task('es6', () => {
    return browserify('./src/js/main.js', {
        transform: ['babelify', 'require-globify', 'browserify-shim'],
        debug: !PRODUCTION
    })
    .bundle()
    // this must to listen error event, can't use plumber
    // use gutil and console to pretty error output
    .on('error', err => gutil.log(err.message) & console.log(err.codeFrame))
    .pipe(plumber())
    .pipe(source('app.js'))
    .pipe(ngAnnotate())
    .pipe(condition(PRODUCTION, uglify()))
    .pipe(rename('app.js'))<commit_msg>fix: uglify file warning after source('app.js'), change to 'src/js/app.js'<commit_after>import gulp from 'gulp'
import babelify from 'babelify'
import browserSync from 'browser-sync'
import browserify from 'browserify'
import browserifyShim from 'browserify-shim'
import rename from 'gulp-rename'
import stylus from 'gulp-stylus'
import concat from 'gulp-concat'
import jade from 'gulp-jade'
import es from 'event-stream'
import rimraf from 'rimraf'
import ghPages from 'gulp-gh-pages'
import autoprefixer from 'gulp-autoprefixer'
import sourcemaps from 'gulp-sourcemaps'
import imagemin from 'gulp-imagemin'
import watch from 'gulp-watch'
import uglify from 'gulp-uglify'
import resrc from 'gulp-resrc'
import condition from 'gulp-if'
import header from 'gulp-header'
import plumber from 'gulp-plumber'
import source from 'vinyl-source-stream'
import ngAnnotate from 'gulp-ng-annotate'
import gutil from 'gulp-util'
import eslint from 'gulp-eslint'

const PRODUCTION = process.env.NODE_ENV && process.env.NODE_ENV.toLowerCase() === 'production';
const DIST = './dist'

gulp.task('es6', () => {
    return browserify('./src/js/main.js', {
        transform: ['babelify', 'require-globify', 'browserify-shim'],
        debug: !PRODUCTION
    })
    .bundle()
    // this must to listen error event, can't use plumber
    // use gutil and console to pretty error output
    .on('error', err => gutil.log(err.message) & console.log(err.codeFrame))
    .pipe(plumber())
    .pipe(source('src/js/app.js'))
    .pipe(ngAnnotate())
    .pipe(condition(PRODUCTION, uglify()))
    .pipe(rename('app.js'))
{'fraction_non_alphanumeric': 0.13004484304932734, 'fraction_numerical': 0.0006406149903907751, 'mean_word_length': 4.527433628318584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3166957', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1044, 'n_words': 297}