<commit_before>/*
 * modules / dependencies
 */
var page = require('page.js');
var PageConfig = require('page-config');

var PageFilemanager = require('page-filemanager');
var PageUpload = require('page-upload');
var PageTranslate = require('page-translate');
var PageI18n = require('page-i18n');

var PageArticle = require('page-article');
var PageArticles = require('page-articles');
var PageProject = require('page-project');
var PageProjects = require('page-projects');
var PageContact = require('page-contact');
var PageHome = require('page-home');


/*
 * variables
 */
var root = !module.exports.length;

/**
 * glintcms application
 *
 * @param options Object
 */
module.exports = function glintcms(options) {

  // get options
  var o = PageConfig(options);

  // routes
  // auth is done completely on the server ;-)
  PageFilemanager(o.filemanager);
  PageUpload(o.upload);

  // routes
  // auth is done completely on the server ;-)
  PageI18n(o.i18n);
  PageArticle(o.article);
  PageArticles(o.articles);
  PageProject(o.project);
  PageProjects(o.projects);
  PageContact(o.contact);
  PageFilemanager(o.filemanager);
  PageUpload(o.upload);
  PageTranslate(o.translate);
  PageHome(o.home);

  // initialize page.js router
  page(o.browser || {
      click: false,
      dispatch: false,
      decodeURLComponents: false
    });

  // initialize socket.io communication
  //var io = window.io = require('glint-socket-io').io;
  //var socket = window.socket = require('glint-socket-io')();<commit_msg>fix page.js dispatch<commit_after>/*
 * modules / dependencies
 */
var page = require('page.js');
var PageConfig = require('page-config');

var PageFilemanager = require('page-filemanager');
var PageUpload = require('page-upload');
var PageTranslate = require('page-translate');
var PageI18n = require('page-i18n');

var PageArticle = require('page-article');
var PageArticles = require('page-articles');
var PageProject = require('page-project');
var PageProjects = require('page-projects');
var PageContact = require('page-contact');
var PageHome = require('page-home');


/*
 * variables
 */
var root = !module.exports.length;

/**
 * glintcms application
 *
 * @param options Object
 */
module.exports = function glintcms(options) {

  // get options
  var o = PageConfig(options);

  // routes
  // auth is done completely on the server ;-)
  PageI18n(o.i18n);
  PageArticle(o.article);
  PageArticles(o.articles);
  PageProject(o.project);
  PageProjects(o.projects);
  PageContact(o.contact);
  PageFilemanager(o.filemanager);
  PageUpload(o.upload);
  PageTranslate(o.translate);
  PageHome(o.home);

  // initialize page.js router
  page(o.browser || {
      click: false,
      dispatch: true,
      decodeURLComponents: false
    });

  // initialize socket.io communication
  //var io = window.io = require('glint-socket-io').io;
  //var socket = window.socket = require('glint-socket-io')();
{'fraction_non_alphanumeric': 0.15342465753424658, 'fraction_numerical': 0.005479452054794521, 'mean_word_length': 4.1335676625659055, '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': '1482667', 'n_tokens_mistral': 926, 'n_tokens_neox': 894, 'n_words': 201}