<commit_before>'use strict';

var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');
var exec = require('child_process').exec;

var installFrontend = function installFrontend () {
  var self = this;
  self.log.info("Fetching dependencies and building front-end...");
  exec("grunt install", function () {
    exec("grunt build", function () {
      self.log.info("Done!");
    });
  });
};

var ErmaGenerator = module.exports = function ErmaGenerator(args, options, config) {
  yeoman.generators.Base.apply(this, arguments);

  this.on('end', function () {
    this.installDependencies({ skipInstall: options['skip-install'], callback: installFrontend.bind(this) });
  });

  this.pkg = JSON.parse(this.readFileAsString(path.join(__dirname, '../package.json')));
};

util.inherits(ErmaGenerator, yeoman.generators.Base);

ErmaGenerator.prototype.askFor = function askFor() {
  var cb = this.async();

  console.log(this.yeoman);

  var prompts = [{
    name: 'name',
    message: 'Project name (for ex., super-project)'
  }, {
    name: 'author',
    message: 'Author nickname (for ex., super-author)'
  }, {
    name: "authorName",
    message: "Author name (for ex., Super Author)"
  }, {
    name: "description",
    message: "Project description (for ex., The most awesome thing you've ever seen!)"
  }, {
    name: "keywords",
    message: "Keywords (for ex., \"keyword\", \"another expression\")"
  }];

  this.prompt(prompts, function (props) {
    this.name = props.name;
    this.author = props.author;
    this.authorName = props.authorName;
    this.description = props.description;
    this.keywords = props.keywords;
    cb();
  }.bind(this));
};

ErmaGenerator.prototype.modules = function modules() {
  this.mkdir("modules");
  this.copy("modules/Log.coffee", "modules/Log.coffee");
  this.copy("modules/Resources.coffee", "modules/Resources.coffee");
  this.copy("modules/Security.coffee", "modules/Security.coffee");
  this.copy("modules/User.coffee", "modules/User.coffee");  
};

ErmaGenerator.prototype.public_ = function public_() {
  this.mkdir("public");
  this.mkdir("public/images");
  this.copy("public/images/back.jpg", "public/images/back.jpg");
  this.copy("public/landing.css", "public/landing.css");
  this.copy("public/style.css", "public/style.css");
};<commit_msg>Included front-end into list of copied things during app generation.<commit_after>'use strict';

var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');
var exec = require('child_process').exec;

var installFrontend = function installFrontend () {
  var self = this;
  self.log.info("Fetching dependencies and building front-end...");
  exec("grunt install", function () {
    exec("grunt build", function () {
      self.log.info("Done!");
    });
  });
};

var ErmaGenerator = module.exports = function ErmaGenerator(args, options, config) {
  yeoman.generators.Base.apply(this, arguments);

  this.on('end', function () {
    this.installDependencies({ skipInstall: options['skip-install'], callback: installFrontend.bind(this) });
  });

  this.pkg = JSON.parse(this.readFileAsString(path.join(__dirname, '../package.json')));
};

util.inherits(ErmaGenerator, yeoman.generators.Base);

ErmaGenerator.prototype.askFor = function askFor() {
  var cb = this.async();

  console.log(this.yeoman);

  var prompts = [{
    name: 'name',
    message: 'Project name (for ex., super-project)'
  }, {
    name: 'author',
    message: 'Author nickname (for ex., super-author)'
  }, {
    name: "authorName",
    message: "Author name (for ex., Super Author)"
  }, {
    name: "description",
    message: "Project description (for ex., The most awesome thing you've ever seen!)"
  }, {
    name: "keywords",
    message: "Keywords (for ex., \"keyword\", \"another expression\")"
  }];

  this.prompt(prompts, function (props) {
    this.name = props.name;
    this.author = props.author;
    this.authorName = props.authorName;
    this.description = props.description;
    this.keywords = props.keywords;
    cb();
  }.bind(this));
};

ErmaGenerator.prototype.modules = function modules() {
  this.mkdir("modules");
  this.copy("modules/Log.coffee", "modules/Log.coffee");
  this.copy("modules/Resources.coffee", "modules/Resources.coffee");
  this.copy("modules/Security.coffee", "modules/Security.coffee");
  this.copy("modules/User.coffee", "modules/User.coffee");  
};

ErmaGenerator.prototype.public_ = function public_() {
  this.mkdir("public");
  this.mkdir("public/images");
  this.copy("public/images/back.jpg", "public/images/back.jpg");
  this.copy("public/landing.css", "public/landing.css");
  this.copy("public/style.css", "public/style.css");

  this.copy("public/app.coffee", "public/app.coffee");
  this.copy("public/bus.coffee", "public/bus.coffee");
  this.copy("public/main.coffee", "public/main.coffee");
  this.copy("public/routes.coffee", "public/routes.coffee");
  this.copy("public/routing.coffee", "public/routing.coffee");
};
{'fraction_non_alphanumeric': 0.1791608669715649, 'fraction_numerical': 0.0, 'mean_word_length': 4.217842323651452, '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': '6736841', 'n_tokens_mistral': 1641, 'n_tokens_neox': 1583, 'n_words': 317}