<commit_before>'use strict';

// options and argv schema

var node_path = require('path');

exports.shorthands = {
    c: 'cwd',
    h: 'help',
    p: 'port'
};

exports.schema = {
    help: {
        type: Boolean
    },

    cwd: {
        type: node_path,
        default: process.cwd()
    },

    docs: {
        setter: function (value, is_default) {
            var cwd = this.get('cwd');

            if ( is_default ) {
                return node_path.join(cwd, 'doc');
            }

            if ( value === node_path.resolve(value) ) {
                return value;
            }

            return node_path.resolve(cwd, value);
        }
    },

    port: {
        type: Number,
        // d0mT
        default: 9037
    }
};<commit_msg>finish schema<commit_after>'use strict';

// options and argv schema

var node_path = require('path');
var fs = require('fs-sync');

exports.shorthands = {
    c: 'cwd',
    h: 'help',
    p: 'port'
};

exports.schema = {
    help: {
        type: Boolean
    },

    cwd: {
        type: node_path,
        default: process.cwd()
    },

    docs: {
        setter: function (value, is_default) {
            var cwd = this.get('cwd');

            if ( is_default ) {
                value = node_path.join(cwd, 'doc');

            } else if ( value !== node_path.resolve(value) ) {
                value = node_path.resolve(cwd, value);
            }

            return value;
        }
    },

    port: {
        type: Number,
        // d0mT
        default: 9037
    },

    // not available yet
    theme: {
        default: node_path.join(__dirname, '..', 'theme'),
        setter: function (value, is_default) {
            // fake, hard code
            return node_path.join(__dirname, '..', 'theme');
        }
    }
};
{'fraction_non_alphanumeric': 0.14134078212290502, 'fraction_numerical': 0.00558659217877095, 'mean_word_length': 1.4875, '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': '6834858', 'n_tokens_mistral': 591, 'n_tokens_neox': 565, 'n_words': 126}