<commit_before>// Copyright 2002-2015, University of Colorado Boulder

/**
 * Grunt configuration file for PhET projects.
 * Requires a package.json file containing project settings.
 * Reads the following properties from package.json: name, version, phetLibs
 *
 * @author <NAME> (PixelZoom, Inc.)
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 */

var assert = require( 'assert' );
var fs = require( 'fs' );
var child_process = require( 'child_process' );
var info = require( '../../sherpa/info' );
var _ = require( '../../sherpa/lodash-2.4.1.min' );
var checkoutShas = require( '../../chipper/grunt/checkoutShas' );
var pullAll = require( '../../chipper/grunt/pullAll' );
var createSim = require( '../../chipper/grunt/createSim' );

/*
 * Register fs as a global so it can be accessed through the requirejs build system. Text.js plugin
 * may have a superior way to handle this but I (SR) couldn't get it working after a small amount of effort.
 */
global.fs = fs;

module.exports = function( grunt ) {
  'use strict';

  var FALLBACK_LOCAL = 'en';

  function trimWhitespace( str ) {
    return str.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' );
  }

  function padString( str, n ) {
    while ( str.length < n ) {
      str += ' ';
    }
    return str;
  }

  //TODO: chipper#99 This is a copy of requirejs-plugins/loadFileAsDataURI.js and should be deleted if we can figure out how to load that one
  function loadFileAsDataURI( filename ) {<commit_msg>#97 allow Gruntfile.js to define '_', supress jshint W079<commit_after>// Copyright 2002-2015, University of Colorado Boulder

/**
 * Grunt configuration file for PhET projects.
 * Requires a package.json file containing project settings.
 * Reads the following properties from package.json: name, version, phetLibs
 *
 * @author <NAME> (PixelZoom, Inc.)
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 */

var assert = require( 'assert' );
var fs = require( 'fs' );
var child_process = require( 'child_process' );
var info = require( '../../sherpa/info' );
/* jshint -W079 */
var _ = require( '../../sherpa/lodash-2.4.1.min' );
var checkoutShas = require( '../../chipper/grunt/checkoutShas' );
var pullAll = require( '../../chipper/grunt/pullAll' );
var createSim = require( '../../chipper/grunt/createSim' );

/*
 * Register fs as a global so it can be accessed through the requirejs build system. Text.js plugin
 * may have a superior way to handle this but I (SR) couldn't get it working after a small amount of effort.
 */
global.fs = fs;

module.exports = function( grunt ) {
  'use strict';

  var FALLBACK_LOCAL = 'en';

  function trimWhitespace( str ) {
    return str.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' );
  }

  function padString( str, n ) {
    while ( str.length < n ) {
      str += ' ';
    }
    return str;
  }

  //TODO: chipper#99 This is a copy of requirejs-plugins/loadFileAsDataURI.js and should be deleted if we can figure out how to load that one
  function loadFileAsDataURI( filename ) {
{'fraction_non_alphanumeric': 0.1471861471861472, 'fraction_numerical': 0.011322011322011322, 'mean_word_length': 3.2131837307152877, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '3579266', 'n_tokens_mistral': 985, 'n_tokens_neox': 955, 'n_words': 331}