<commit_before>var gulp = require('gulp');
var browserify = require('browserify');
var transform = require('vinyl-transform');
var header = require('gulp-header');
var fileImports = require('gulp-imports');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var bump = require('gulp-bump');
var size = require('gulp-size');
var replace = require('gulp-replace');
var coveralls = require('gulp-coveralls');
var Server = require('karma').Server;
var _ = require('lodash');
var runSequence = require('run-sequence');
var fs = require('fs');
var less = require('gulp-less');

var pkg = require('./package.json');
var reporter = 'list';
var args = require('yargs').argv;

var browserified = function() {
  return transform(function(filename) {
    return browserify(filename).bundle();
  });
};

// Browsers to run on Sauce Labs
var customLaunchers = {
  'SL_Chrome': {
    base: 'SauceLabs',
    browserName: 'chrome'
  },
  'SL_InternetExplorer': {
    base: 'SauceLabs',
    browserName: 'internet explorer',
    version: '10'
  },
  'SL_FireFox': {
    base: 'SauceLabs',
    browserName: 'firefox',
  }
};

var karmaConfig = {
  sauce: {
    sauceLabs: {
      testName: 'Footwork Unit Tests'
    },
    captureTimeout: 120000,
    customLaunchers: customLaunchers,
    reporters: ['spec', 'saucelabs'],
    browsers: Object.keys(customLaunchers),
    singleRun: true
  },
  normal: {
    configFile: __dirname + '/karma.conf.js',
    singleRun: true
  }
};

var banner = [
  '/**',
  ' * <%= pkg.name %> - <%= pkg.description %>',
  ' * Author: <%= pkg.author %>',
  ' * Version: v<%= pkg.version %>',
  ' * Url: <%= pkg.homepage %>',
  ' * License(s): <% pkg.licenses.forEach(function( license, idx ){ %><%= license.type %><% if(idx !== pkg.licenses.length-1) { %>, <% } %><% }); %>',
  ' */',
  '', ''
];

function buildRelease(buildProfile) {
  var headerBanner = banner.slice(0).join('\n');
  var pkgData = pkg;

  pkgData = _.extend({}, pkg, { version: pkg.version + '-' + buildProfile });
  var stream = gulp
    .src(['source/build-profile/' + buildProfile + '.js'])
    .pipe(header(headerBanner, { pkg: pkgData }))
    .pipe(fileImports())<commit_msg>added platform option to saucelabs browsers<commit_after>var gulp = require('gulp');
var browserify = require('browserify');
var transform = require('vinyl-transform');
var header = require('gulp-header');
var fileImports = require('gulp-imports');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var bump = require('gulp-bump');
var size = require('gulp-size');
var replace = require('gulp-replace');
var coveralls = require('gulp-coveralls');
var Server = require('karma').Server;
var _ = require('lodash');
var runSequence = require('run-sequence');
var fs = require('fs');
var less = require('gulp-less');

var pkg = require('./package.json');
var reporter = 'list';
var args = require('yargs').argv;

var browserified = function() {
  return transform(function(filename) {
    return browserify(filename).bundle();
  });
};

// Browsers to run on Sauce Labs
var customLaunchers = {
  'SL_Chrome': {
    base: 'SauceLabs',
    browserName: 'chrome',
    platform: 'windows'
  },
  'SL_InternetExplorer': {
    base: 'SauceLabs',
    browserName: 'internet explorer',
    version: '10',
    platform: 'windows'
  },
  'SL_FireFox': {
    base: 'SauceLabs',
    browserName: 'firefox',
    platform: 'windows'
  }
};

var karmaConfig = {
  sauce: {
    sauceLabs: {
      testName: 'Footwork Unit Tests'
    },
    captureTimeout: 120000,
    customLaunchers: customLaunchers,
    reporters: ['dots', 'saucelabs'],
    browsers: Object.keys(customLaunchers),
    singleRun: true
  },
  normal: {
    configFile: __dirname + '/karma.conf.js',
    singleRun: true
  }
};

var banner = [
  '/**',
  ' * <%= pkg.name %> - <%= pkg.description %>',
  ' * Author: <%= pkg.author %>',
  ' * Version: v<%= pkg.version %>',
  ' * Url: <%= pkg.homepage %>',
  ' * License(s): <% pkg.licenses.forEach(function( license, idx ){ %><%= license.type %><% if(idx !== pkg.licenses.length-1) { %>, <% } %><% }); %>',
  ' */',
  '', ''
];

function buildRelease(buildProfile) {
  var headerBanner = banner.slice(0).join('\n');
  var pkgData = pkg;

  pkgData = _.extend({}, pkg, { version: pkg.version + '-' + buildProfile });
  var stream = gulp
    .src(['source/build-profile/' + buildProfile + '.js'])
    .pipe(header(headerBanner, { pkg: pkgData }))
    .pipe(fileImports())
{'fraction_non_alphanumeric': 0.1943202146690519, 'fraction_numerical': 0.004472271914132379, 'mean_word_length': 3.8938730853391683, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '558484', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1525, 'n_words': 322}