<commit_before>#!/usr/bin/env node

var fs = require('fs');

// Read and eval library
filedata = fs.readFileSync('./build/debug/page.js', 'utf8');
eval(filedata);

console.log(this['cbxrs']['ui']['page']['soy']['main']());<commit_msg>Fix temporary output_page.js script to work in release/debug modes.<commit_after>#!/usr/bin/env node

// Note: This file is temporary, for testing, until express server is ready.

var commander = require('commander');
var fs = require('fs');

commander.option('--debug', 'Build in debug mode').parse(process.argv);
var dir = commander.debug ? 'debug' : 'release';

// Read and eval library.
filedata = fs.readFileSync('./build/' + dir + '/page.js', 'utf8');
(function() { eval.call(this, filedata); })();

console.log(cbxrs.ui.page.soy.main());
{'fraction_non_alphanumeric': 0.2043701799485861, 'fraction_numerical': 0.002570694087403599, 'mean_word_length': 5.038759689922481, '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': '6386342', 'n_tokens_mistral': 259, 'n_tokens_neox': 254, 'n_words': 64}