<commit_before>'use strict';

var fs = require('fs');
var path = require('path');
var util = require('util');
var events = require('events');

var glob = require('glob');
var Spider = require('./spider.js');
var Optimizer = require('./optimizer.js');
var Convertor = require('./convertor.js');

// http://font-spider.org/css/style.css
//var RE_SERVER = /^(\/|http\:|https\:)/i;
var RE_SERVER = /^(http\:|https\:)/i;



var copyFile = function (srcpath, destpath) {
    var contents = fs.readFileSync(srcpath);
    fs.writeFileSync(destpath, contents);
};



var FontSpider = function (src, options) {

    if (typeof src === 'string') {
        src = glob.sync(src);
    } else {
        var srcs = [];
        src.forEach(function (item) {
            srcs = srcs.concat(glob.sync(item));
        });
        src = srcs;
    }

    options = options || {};
    Object.keys(FontSpider.defaults).forEach(function (key) {
        if (options[key] === undefined) {
            options[key] = FontSpider.defaults[key];
        }
    });

    this.src = src;
    this.options = options;
};


FontSpider.BACKUP_EXTNAME = '.backup';
FontSpider.defaults = {
    debug: false,
    silent: false,
    backup: true,
    ignore: [],
    map: []
};



FontSpider.Spider = Spider;
FontSpider.Optimizer = Optimizer;
FontSpider.Convertor = Convertor;


FontSpider.prototype = {<commit_msg>修改默认配置<commit_after>'use strict';

var fs = require('fs');
var path = require('path');
var util = require('util');
var events = require('events');

var glob = require('glob');
var Spider = require('./spider.js');
var Optimizer = require('./optimizer.js');
var Convertor = require('./convertor.js');

// http://font-spider.org/css/style.css
//var RE_SERVER = /^(\/|http\:|https\:)/i;
var RE_SERVER = /^(http\:|https\:)/i;



var copyFile = function (srcpath, destpath) {
    var contents = fs.readFileSync(srcpath);
    fs.writeFileSync(destpath, contents);
};



var FontSpider = function (src, options) {

    if (typeof src === 'string') {
        src = glob.sync(src);
    } else {
        var srcs = [];
        src.forEach(function (item) {
            srcs = srcs.concat(glob.sync(item));
        });
        src = srcs;
    }

    options = options || {};
    Object.keys(FontSpider.defaults).forEach(function (key) {
        if (options[key] === undefined) {
            options[key] = FontSpider.defaults[key];
        }
    });

    this.src = src;
    this.options = options;
};


FontSpider.BACKUP_EXTNAME = '.backup';
FontSpider.defaults = Object.create(Spider.defaults);
FontSpider.defaults.backup = true;



FontSpider.Spider = Spider;
FontSpider.Optimizer = Optimizer;
FontSpider.Convertor = Convertor;


FontSpider.prototype = {
{'fraction_non_alphanumeric': 0.17402501839587933, 'fraction_numerical': 0.0, 'mean_word_length': 2.9809663250366034, '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': '6045267', 'n_tokens_mistral': 921, 'n_tokens_neox': 896, 'n_words': 183}