<commit_before>var fs = require('fs');
var path = require('path');
var _ = require('underscore');

var addonsManager = require('../core/cb.addons/manager'); 

module.exports = function(grunt) {
    grunt.registerMultiTask('buildAddons', 'Build default add-ons', function() {
        var done = this.async();

        _.defaults(this.data, {
            force: true
        });

        var folder = this.data.addonsFolder;
        var force = this.data.force;

        grunt.log.writeln("Building addons in "+folder);

        addonsManager.loadAddonsInfos({}, folder)
        .then(addonsManager.runAddonsOperation(function(addon) {
            return addon.optimizeClient(force);
        }, {
            failOnError: false
        }))
        .then(function() {
            done();
        }, function(err) {
            grunt.log.error(err);
            done(false);
        });
    });<commit_msg>Add log for force option in buildAddons task<commit_after>var fs = require('fs');
var path = require('path');
var _ = require('underscore');

var addonsManager = require('../core/cb.addons/manager'); 

module.exports = function(grunt) {
    grunt.registerMultiTask('buildAddons', 'Build default add-ons', function() {
        var done = this.async();

        _.defaults(this.data, {
            force: true
        });

        var folder = this.data.addonsFolder;
        var force = this.data.force;

        grunt.log.writeln("Building addons in "+folder+" (force="+force+")");

        addonsManager.loadAddonsInfos({}, folder)
        .then(addonsManager.runAddonsOperation(function(addon) {
            return addon.optimizeClient(force);
        }, {
            failOnError: false
        }))
        .then(function() {
            done();
        }, function(err) {
            grunt.log.error(err);
            done(false);
        });
    });
{'fraction_non_alphanumeric': 0.14655172413793102, 'fraction_numerical': 0.0, 'mean_word_length': 2.2295652173913045, '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': '4411767', 'n_tokens_mistral': 549, 'n_tokens_neox': 533, 'n_words': 100}