<commit_before>var resource = require('resource'),
    view = resource.use('view'),
    layout = resource.define('layout');

layout.schema.description = "layout resource";

layout.persist('memory');

// .init() convention
function init(callback) {
  // setup .view convention
  var view = resource.use('view'),
      fs = require('fs');
  view.create({
    template: fs.readFileSync(__dirname + '/view/layout.html'),
    presenter: require('./view/layout')
  }, function(err, _view) {
    if (err) { return callback(err); }
    layout.view = _view;
    return callback(null, _view);
  });
}
layout.method('init', init, {
  description: "inits layout"
});

layout.dependencies = {
  "html-lang": "*",
  "Faker": "*"
};
exports.layout = layout;
<commit_msg>[layout] fixed creation of layout view<commit_after>var resource = require('resource'),
    view = resource.use('view'),
    layout = resource.define('layout');

layout.schema.description = "layout resource";

layout.persist('memory');

// .init() convention
function init(callback) {
  // setup .view convention
  var view = resource.use('view'),
      fs = require('fs');
  view.create({
    templatePath: __dirname + '/view/layout.html',
    presenterPath: __dirname + '/view/layout'
  }, function(err, _view) {
    if (err) { return callback(err); }
    layout.view = _view;
    return callback(null, _view);
  });
}
layout.method('init', init, {
  description: "inits layout"
});

layout.dependencies = {
  "html-lang": "*",
  "Faker": "*"
};
exports.layout = layout;

{'fraction_non_alphanumeric': 0.181282722513089, 'fraction_numerical': 0.0, 'mean_word_length': 3.8694267515923566, 'pattern_counts': {'":': 4, '<': 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': '5292790', 'n_tokens_mistral': 479, 'n_tokens_neox': 475, 'n_words': 106}