<commit_before>'use strict';

var fuse = require('fusing')
  , path = require('path')
  , fs = require('fs');

//
// Defaults.
//
var Assets = require('./assets')
  , available = [ 'nodejitsu', 'npm' ];

/**
 * Contour will register several default HTML5 templates of Nodejitsu. These
 * templates can used from inside views of other projects.
 *
 * Options that can be supplied
 *  - brand {String} framework or brand to use, e.g nodejitsu or opsmezzo
 *  - mode {String} bigpipe or standalone, defaults to bigpipe
 *
 * @Constructor
 * @param {Object} options optional, see above
 * @api public
 */
function Contour(options) {
  this.fuse();

  //
  // Add the pagelets of the required framework.
  //
  options = options || {};
  this.mixin(this, new Assets(options.brand, options.mode || 'bigpipe'));
}

//
// Add EventEmitter and Predefine functionality.
//
fuse(Contour, require('events').EventEmitter);

/**
 * Small helper function that exposes the core per brand.
 *
 * @param {String} brand available brands
 * @return {String} path to the core stylus file
 * @api public
 */
Contour.get = function get(brand) {
  if (!~available.indexOf(brand)) brand = 'nodejitsu';
  var base = path.join(__dirname, 'assets', brand);

  return fs.readdirSync(base).reduce(function reduce(memo, file) {
    if ('.styl' !== path.extname(file)) return memo;

    memo[path.basename(file, '.styl')] = path.join(base, file);<commit_msg>[fix] get files from pagelets directory<commit_after>'use strict';

var fuse = require('fusing')
  , path = require('path')
  , fs = require('fs');

//
// Defaults.
//
var Assets = require('./assets')
  , available = [ 'nodejitsu', 'npm' ];

/**
 * Contour will register several default HTML5 templates of Nodejitsu. These
 * templates can used from inside views of other projects.
 *
 * Options that can be supplied
 *  - brand {String} framework or brand to use, e.g nodejitsu or opsmezzo
 *  - mode {String} bigpipe or standalone, defaults to bigpipe
 *
 * @Constructor
 * @param {Object} options optional, see above
 * @api public
 */
function Contour(options) {
  this.fuse();

  //
  // Add the pagelets of the required framework.
  //
  options = options || {};
  this.mixin(this, new Assets(options.brand, options.mode || 'bigpipe'));
}

//
// Add EventEmitter and Predefine functionality.
//
fuse(Contour, require('events').EventEmitter);

/**
 * Small helper function that exposes the core per brand.
 *
 * @param {String} brand available brands
 * @return {String} path to the core stylus file
 * @api public
 */
Contour.get = function get(brand) {
  if (!~available.indexOf(brand)) brand = 'nodejitsu';
  var base = path.join(__dirname, 'pagelets', brand);

  return fs.readdirSync(base).reduce(function reduce(memo, file) {
    if ('.styl' !== path.extname(file)) return memo;

    memo[path.basename(file, '.styl')] = path.join(base, file);
{'fraction_non_alphanumeric': 0.14652777777777778, 'fraction_numerical': 0.0006944444444444445, 'mean_word_length': 3.754125412541254, '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': '3759436', 'n_tokens_mistral': 908, 'n_tokens_neox': 888, 'n_words': 286}