<commit_before>'use strict';

const Path        = require('path');
const _           = require('lodash');
const Theme       = require('@frctl/fractal').WebTheme;
const packageJSON = require('../package.json');

module.exports = function(options){

    const config = _.defaultsDeep(_.clone(options || {}), {
        skin: 'default',
        rtl: false,
        lang: 'en',
        styles: 'default',
        scripts: 'default',
        format: 'json',
        theme: {
            mount: '_theme',
        },
        nav: ['components','docs','assets'],
        panels: ['html', 'view', 'context', 'resources', 'info', 'notes'],
        version: packageJSON.version,
        favicon: null
    });

    config.styles = [].concat(config.styles).concat(config.stylesheet).filter(url => url).map(url => (url === 'default' ? `/${config.theme.mount}/css/${config.skin}.css` : url));
    config.scripts = [].concat(config.scripts).filter(url => url).map(url => (url === 'default' ? `/${config.theme.mount}/js/mandelbrot.js` : url));
    config.favicon = config.favicon || `/${config.theme.mount}/favicon.ico`

    const theme = new Theme(Path.join(__dirname, '../views'), config);

    theme.setErrorView('pages/error.nunj');

    theme.addStatic(Path.join(__dirname, '../dist'), `/${config.theme.mount}`);

    theme.addRoute('/', {
        handle: 'overview',
        view: 'pages/doc.nunj',
    });

    theme.addRoute('/docs', {
        redirect: '/'
    });

    theme.addRoute('/components', {
        redirect: '/'
    });

    theme.addRoute('/assets', {
        redirect: '/'
    });

    theme.addRoute('/assets/:name', {
        handle: 'asset-source',
        view: 'pages/assets.nunj'<commit_msg>Change config key for static mount point<commit_after>'use strict';

const Path        = require('path');
const _           = require('lodash');
const Theme       = require('@frctl/fractal').WebTheme;
const packageJSON = require('../package.json');

module.exports = function(options){

    const config = _.defaultsDeep(_.clone(options || {}), {
        skin: 'default',
        rtl: false,
        lang: 'en',
        styles: 'default',
        scripts: 'default',
        format: 'json',
        static: {
            mount: '_theme',
        },
        nav: ['components','docs','assets'],
        panels: ['html', 'view', 'context', 'resources', 'info', 'notes'],
        version: packageJSON.version,
        favicon: null
    });

    config.styles = [].concat(config.styles).concat(config.stylesheet).filter(url => url).map(url => (url === 'default' ? `/${config.static.mount}/css/${config.skin}.css` : url));
    config.scripts = [].concat(config.scripts).filter(url => url).map(url => (url === 'default' ? `/${config.static.mount}/js/mandelbrot.js` : url));
    config.favicon = config.favicon || `/${config.static.mount}/favicon.ico`

    const theme = new Theme(Path.join(__dirname, '../views'), config);

    theme.setErrorView('pages/error.nunj');

    theme.addStatic(Path.join(__dirname, '../dist'), `/${config.static.mount}`);

    theme.addRoute('/', {
        handle: 'overview',
        view: 'pages/doc.nunj',
    });

    theme.addRoute('/docs', {
        redirect: '/'
    });

    theme.addRoute('/components', {
        redirect: '/'
    });

    theme.addRoute('/assets', {
        redirect: '/'
    });

    theme.addRoute('/assets/:name', {
        handle: 'asset-source',
        view: 'pages/assets.nunj'
{'fraction_non_alphanumeric': 0.20372526193247964, 'fraction_numerical': 0.0, 'mean_word_length': 2.6217070600632244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3042733', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1042, 'n_words': 183}