<commit_before>'use strict';

var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var vfs = require('vinyl-fs');
var uglify = require('gulp-uglify');
var _ = require('lodash');
var glob = require('glob');
var watchify = require('watchify');
var browserify = require('browserify');
var babelify = require('babelify');
var path = require('path');
var gulpif = require('gulp-if');
var header = require('gulp-header');
var futil = require('fosify');
var collapse = require('bundle-collapser/plugin');
var pkg = require('./package.json');
var insertGlobalVars = require('./lib/insert-global-vars');
var cwd = path.resolve(process.cwd());

var es6Extensions = ['.babel', '.es6'];
var standardExtensions = ['.jsx', '.js', '.json'];
var allExtensions = standardExtensions.concat(es6Extensions);

function getHeaderCode(livereload) {
  var code = '/*! Was bundled at ' + new Date() + ' */\n';

  if (!livereload) {
    return code;
  }

  var port = livereload.port || '2769';

  return code + '(function(d, s, id) {' +
    'var js, fjs = d.getElementsByTagName(s)[0];' +
    'if (d.getElementById(id)) return;' +
    'js = d.createElement(s); js.id = id;' +
    'js.src = "https://localhost:' + port + '/livereload.js";' +
    'fjs.parentNode.insertBefore(js, fjs);' +
    '})(document, \'script\', \'livereload\');';
}

function bundle(bundleName, bundler, opts) {
  opts = opts || {};

  if (!opts.dest) {
    throw new Error('opts.dest is required');
  }
<commit_msg>Correct protocol is added livereload.<commit_after>'use strict';

var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var vfs = require('vinyl-fs');
var uglify = require('gulp-uglify');
var _ = require('lodash');
var glob = require('glob');
var watchify = require('watchify');
var browserify = require('browserify');
var babelify = require('babelify');
var path = require('path');
var gulpif = require('gulp-if');
var header = require('gulp-header');
var futil = require('fosify');
var collapse = require('bundle-collapser/plugin');
var pkg = require('./package.json');
var insertGlobalVars = require('./lib/insert-global-vars');
var cwd = path.resolve(process.cwd());

var es6Extensions = ['.babel', '.es6'];
var standardExtensions = ['.jsx', '.js', '.json'];
var allExtensions = standardExtensions.concat(es6Extensions);

function getHeaderCode(livereload) {
  var code = '/*! Was bundled at ' + new Date() + ' */\n';

  if (!livereload) {
    return code;
  }

  var port = livereload.port || '2769';
  var isSecure = !!livereload.key;
  var protocol = isSecure ? 'https:' : 'http:';

  return code + '(function(d, s, id) {' +
    'var js, fjs = d.getElementsByTagName(s)[0];' +
    'if (d.getElementById(id)) return;' +
    'js = d.createElement(s); js.id = id;' +
    'js.src = "' + protocol + '//localhost:' + port + '/livereload.js";' +
    'fjs.parentNode.insertBefore(js, fjs);' +
    '})(document, \'script\', \'foso-livereload\');';
}

function bundle(bundleName, bundler, opts) {
  opts = opts || {};

  if (!opts.dest) {
    throw new Error('opts.dest is required');
  }

{'fraction_non_alphanumeric': 0.1994851994851995, 'fraction_numerical': 0.005148005148005148, 'mean_word_length': 4.3788927335640135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '150662', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1027, 'n_words': 253}