<commit_before>var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var es6ify = require('es6ify');
var rename = require('gulp-rename');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var exec = require('child_process').exec;
var args = require('yargs').argv;
var express = require('express');
var util = require('gulp-util');
var livereload = require('gulp-livereload');
var uglify = require('gulp-uglify')
var streamify = require('gulp-streamify')

var files = {
  css:  'public/*.css',
  scss: 'public/*.scss',
  html: 'public/*.html'
};

gulp.task('pre-build', ['sass', 'copy-html', 'copy-css'], function(done) {
  return exec('node bin/hook.js', done);
});

gulp.task('build', ['pre-build'], function(b) {
  return browserify()
    .transform(es6ify.configure(/^(?!.*node_modules)+.+\.js$/))
    .add(es6ify.runtime)
    .add('./index.js', {entry: true})
    .external('ui_plugin')
    .external('ui_object')
    .external('base_object')
    .external('browser')
    .external('zepto')
    .external('underscore')
    .external('media_control')
    .external('playback')
    .external('core_plugin')
    .external('ui_core_plugin')
    .external('container_plugin')
    .external('ui_container_plugin')
    .external('flash')
    .external('mediator')
    .bundle()
    .pipe(source('main.js'))
    .pipe(rename( 'rtmp.js'))
    .pipe(gulp.dest('./dist'));
});

gulp.task('release', ['pre-build'], function() {
  return browserify()
    .transform(es6ify.configure(/^(?!.*node_modules)+.+\.js$/))
    .add(es6ify.runtime)
    .add('./index.js', {entry: true})
    .external('ui_plugin')
    .external('ui_object')
    .external('base_object')
    .external('browser')
    .external('zepto')
    .external('underscore')
    .external('media_control')
    .external('playback')
    .external('core_plugin')
    .external('ui_core_plugin')
    .external('container_plugin')
    .external('ui_container_plugin')
    .external('mediator')
    .external('flash')
    .bundle()
    .pipe(source('main.js'))
    .pipe(rename( 'rtmp.min.js'))
    .pipe(streamify(uglify()))
    .pipe(gulp.dest('./dist'));<commit_msg>gulpfile: get external Events object<commit_after>var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCSS = require('gulp-minify-css');
var es6ify = require('es6ify');
var rename = require('gulp-rename');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var exec = require('child_process').exec;
var args = require('yargs').argv;
var express = require('express');
var util = require('gulp-util');
var livereload = require('gulp-livereload');
var uglify = require('gulp-uglify')
var streamify = require('gulp-streamify')

var files = {
  css:  'public/*.css',
  scss: 'public/*.scss',
  html: 'public/*.html'
};

gulp.task('pre-build', ['sass', 'copy-html', 'copy-css'], function(done) {
  return exec('node bin/hook.js', done);
});

gulp.task('build', ['pre-build'], function(b) {
  return browserify()
    .transform(es6ify.configure(/^(?!.*node_modules)+.+\.js$/))
    .add(es6ify.runtime)
    .add('./index.js', {entry: true})
    .external('ui_plugin')
    .external('ui_object')
    .external('base_object')
    .external('browser')
    .external('zepto')
    .external('underscore')
    .external('media_control')
    .external('playback')
    .external('core_plugin')
    .external('ui_core_plugin')
    .external('container_plugin')
    .external('ui_container_plugin')
    .external('flash')
    .external('mediator')
    .external('events')
    .bundle()
    .pipe(source('main.js'))
    .pipe(rename( 'rtmp.js'))
    .pipe(gulp.dest('./dist'));
});

gulp.task('release', ['pre-build'], function() {
  return browserify()
    .transform(es6ify.configure(/^(?!.*node_modules)+.+\.js$/))
    .add(es6ify.runtime)
    .add('./index.js', {entry: true})
    .external('ui_plugin')
    .external('ui_object')
    .external('base_object')
    .external('browser')
    .external('zepto')
    .external('underscore')
    .external('media_control')
    .external('playback')
    .external('core_plugin')
    .external('ui_core_plugin')
    .external('container_plugin')
    .external('ui_container_plugin')
    .external('mediator')
    .external('flash')
    .external('events')
    .bundle()
    .pipe(source('main.js'))
    .pipe(rename( 'rtmp.min.js'))
    .pipe(streamify(uglify()))
    .pipe(gulp.dest('./dist'));
{'fraction_non_alphanumeric': 0.21286575832030377, 'fraction_numerical': 0.002680366316729953, 'mean_word_length': 4.082860385925085, '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': '5721783', 'n_tokens_mistral': 1540, 'n_tokens_neox': 1525, 'n_words': 241}