<commit_before>(function() {
  var compileConfig, cp, path;

  path = require('path');

  cp = require('cp');

  module.exports = compileConfig = function(grunt) {
    var helpers;
    helpers = require('../../helpers')(grunt);
    return {
      run: function(fn) {
        var compiled, configXml, dest, root, phonegapPath, phonegapRoot, template;
        grunt.log.writeln('Compiling config.xml');
        phonegapPath = helpers.config('path');
        phonegapRoot = helpers.config('root');
        configXml = helpers.config('config');
        dest = path.join(phonegapPath, 'www', 'config.xml');
        root = path.join(phonegapRoot, 'config.xml');
        if (grunt.util.kindOf(configXml) === 'string') {
          grunt.log.writeln("Copying static " + configXml);
          // yield cp(configXml, root);
          cp(configXml, root);
          return cp(configXml, dest, function(err) {
            if (fn) {
              return fn(err);
            }
          });
        } else {
          grunt.log.writeln("Compiling template " + configXml.template);
          template = grunt.file.read(configXml.template);
          compiled = grunt.template.process(template, {
            data: configXml.data
          });
          grunt.file.write(root, compiled);
          grunt.file.write(dest, compiled);
          if (fn) {
            return fn();
          }
        }
      }<commit_msg>Update compile_config.js<commit_after>(function() {
  var compileConfig, cp, path;

  path = require('path');

  cp = require('cp');

  module.exports = compileConfig = function(grunt) {
    var helpers;
    helpers = require('../../helpers')(grunt);
    return {
      run: function(fn) {
        var compiled, configXml, dest, root, phonegapPath, phonegapRoot, template;
        grunt.log.writeln('Compiling config.xml');
        phonegapPath = helpers.config('path');
        phonegapRoot = helpers.config('root');
        configXml = helpers.config('config');
        dest = path.join(phonegapPath, 'config.xml');
        root = path.join(phonegapRoot, 'config.xml');
        if (grunt.util.kindOf(configXml) === 'string') {
          grunt.log.writeln("Copying static " + configXml);
          // yield cp(configXml, root);
          cp(configXml, root);
          return cp(configXml, dest, function(err) {
            if (fn) {
              return fn(err);
            }
          });
        } else {
          grunt.log.writeln("Compiling template " + configXml.template);
          template = grunt.file.read(configXml.template);
          compiled = grunt.template.process(template, {
            data: configXml.data
          });
          grunt.file.write(root, compiled);
          grunt.file.write(dest, compiled);
          if (fn) {
            return fn();
          }
        }
      }
{'fraction_non_alphanumeric': 0.14245014245014245, 'fraction_numerical': 0.0, 'mean_word_length': 2.073304157549234, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 6}, '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': '4506781', 'n_tokens_mistral': 829, 'n_tokens_neox': 811, 'n_words': 158}