<commit_before>/*
 * Sellside Assemble
 * https://github.com/sellside/assemble
 *
 * Authored by <NAME>
 * Inspired by previous work by <NAME>
 */

module.exports = function(grunt) {

  // Grunt utilities
  var file      = grunt.file;
  var log       = grunt.log;
  var kindOf    = grunt.util.kindOf;
  var _         = grunt.util._;

  var assemble  = require('../lib/assemble');

  // external dependencies
  var path             = require('path');
  var fs               = require('fs');
  var util             = require('util');

  var extensions = assemble.Utils.ExtensionMap;

  grunt.registerMultiTask('assemble', 'Compile template files to HTML with specified engines', function(){

    var defaults = {
      layout        : '',
      partials      : {},
      data          : {},
      assets        : '.',
      ext           : '.html'
    };

    //var options = _.extend(defaults, this.data.options || {});
    //var options = this.options(defaults);
    var options = this.options(defaults);
    logBlock("options: ", util.inspect(options));
    logBlock("this.files: ", util.inspect(this.files));

    // try to get a src to use for configuration
    var src;
    this.files.forEach(function(fp) {
      src = fp.src;
    });

    if(!src || src.length === 0) {
      grunt.warn('No source files found.');
      return false;
    }

    // find an engine to use
    options.engine = options.engine || getEngineOf(src);
    if(!options.engine) {
      grunt.warn('No compatible engine available');
      return false;
    }

    var EngineLoader = options.EngineLoader = assemble.EngineLoader(options);
    var engine = null;
    EngineLoader.getEngine(function(err, results) {
      if(err) {
        console.log(err);
        return;<commit_msg>removed defaults variable in Gruntfile<commit_after>/*
 * Sellside Assemble
 * https://github.com/sellside/assemble
 *
 * Authored by <NAME>
 * Inspired by previous work by <NAME>
 */

module.exports = function(grunt) {

  // Grunt utilities
  var file      = grunt.file;
  var log       = grunt.log;
  var kindOf    = grunt.util.kindOf;
  var _         = grunt.util._;

  var assemble  = require('../lib/assemble');

  // external dependencies
  var path             = require('path');
  var fs               = require('fs');
  var util             = require('util');

  var extensions = assemble.Utils.ExtensionMap;

  grunt.registerMultiTask('assemble', 'Compile template files with specified engines', function(){

    var options = this.options({
      layout        : '',
      partials      : {},
      data          : {},
      assets        : '.',
      ext           : '.html'
    });

    logBlock("options: ", util.inspect(options));
    logBlock("this.files: ", util.inspect(this.files));

    // try to get a src to use for configuration
    var src;
    this.files.forEach(function(fp) {
      src = fp.src;
    });

    if(!src || src.length === 0) {
      grunt.warn('No source files found.');
      return false;
    }

    // find an engine to use
    options.engine = options.engine || getEngineOf(src);
    if(!options.engine) {
      grunt.warn('No compatible engine available');
      return false;
    }

    var EngineLoader = options.EngineLoader = assemble.EngineLoader(options);
    var engine = null;
    EngineLoader.getEngine(function(err, results) {
      if(err) {
        console.log(err);
        return;
{'fraction_non_alphanumeric': 0.13503971756398941, 'fraction_numerical': 0.0005884083553986466, 'mean_word_length': 2.2196969696969697, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '7104359', 'n_tokens_mistral': 1020, 'n_tokens_neox': 985, 'n_words': 246}