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

    grunt.registerMultiTask('xbuild', 'run mono xbuild', function() {

        var cp = require('child_process'),
            f = require('util').format,
            verbose = grunt.verbose,
            log = grunt.log,
            done = this.async(),
            options = this.options({
                sln_file: "",
                configuration: "Release",
                target_framework: "v4.0",
                properties: []
            }),
            command = [
                "xbuild",
                options.sln_file,
                "/p:configuration=" + options.configuration,
                "/p:TargetFrameworkVersion=" + options.target_framework
            ];

        verbose.writeflags(options, 'Options');

        for(var p in options.properties){
            command.push([ "/p:", p.key, "=", p.value].join());
        }

        verbose.subhead(command);

        var childProcess = cp.exec(command.join(), {}, function(){});

        childProcess.stdout.on('data', function (d) { log.write(d); });
        childProcess.stderr.on('data', function (d) { log.error(d); });

        childProcess.on('exit', function(code) {
            if (code !== 0) {
                log.error(f('Exited with code: %d.', code));
                return done(false);
            }

            verbose.ok(f('Exited with code: %d.', code));
            done();
        });
    });
};<commit_msg>tidy up the command building<commit_after>module.exports = function(grunt) {
    'use strict';

    grunt.registerMultiTask('xbuild', 'run mono xbuild', function() {
        var cp = require('child_process'),
            f = require('util').format,
            verbose = grunt.verbose,
            log = grunt.log,
            done = this.async(),
            options = this.options({
                configuration: "Release",
                target_framework: "v4.0",
                properties: {}
            }),
            command = [
                "xbuild",
                options.sln_file,
                "/p:configuration=" + options.configuration,
                "/p:TargetFrameworkVersion=" + options.target_framework
            ];

        verbose.writeflags(options, 'Options');

        for(var p in options.properties){
            command.push([ "/p:", p, "=", options.properties[p]].join(""));
        }

        command = command.join(" ");

        verbose.subhead(command);

        var childProcess = cp.exec(command, {}, function(){});

        childProcess.stdout.on('data', function (d) { log.write(d); });
        childProcess.stderr.on('data', function (d) { log.error(d); });

        childProcess.on('exit', function(code) {
            if (code !== 0) {
                log.error(f('Exited with code: %d.', code));
                return done(false);
            }

            verbose.ok(f('Exited with code: %d.', code));
            done();
        });
    });
};
{'fraction_non_alphanumeric': 0.15635507733691997, 'fraction_numerical': 0.0020174848688634837, 'mean_word_length': 1.6681614349775784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5852253', 'n_tokens_mistral': 831, 'n_tokens_neox': 781, 'n_words': 158}