<commit_before>'use strict';
var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');


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

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

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

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

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

  // have Yeoman greet the user.
  console.log(this.yeoman);

  var prompts = [
    {
      name: 'siteName',
      message: 'What is the name of the site you are creating?',
      default: 'express-static'
    },
    {
      name: 'viewEngine',
      message: 'Which view engine would you like to use?',
      type: 'list',
      default: 'jade',
      choices: [
        {
          name: 'jade',
          value: 'jade'
        },
        {
          name: 'handlebars',
          value: 'hbs'
        }
      ]
    },
    {
      name: 'cssEngine',
      message: 'Which css engine would you like to use?',
      type: 'list',
      default: 'stylus',
      choices: [
        {
          name: 'stylus',
          value: 'stylus'
        },
        {
          name: 'sass',
          value: 'sass'
        },
        {
          name: 'less',
          value: 'less'
        },
        {
          name: 'css',
          value: 'css'
        }
      ]
    }
  ];

  this.prompt(prompts, function (props) {

    this.siteName = props.siteName;
    this.viewEngine = props.viewEngine;
    this.cssEngine = props.cssEngine;

    cb();
  }.bind(this));
};

ExpressStaticGenerator.prototype.app = function app() {
  this.mkdir('e2e');
  this.mkdir('public');
  this.mkdir('public/images');
  this.mkdir('public/stylesheets');
  this.mkdir('public/javascripts');
  this.mkdir('routes');
  this.mkdir('views');
  this.mkdir('views/partials');

  switch (this.cssEngine){
    case 'sass':
      this.mkdir('resources');
      this.mkdir('resources/stylesheets');
      this.copy('public/stylesheets/_style.scss', 'resources/stylesheets/style.scss');
      break;
    case 'less':
      this.copy('public/stylesheets/_style.less', 'public/stylesheets/style.less');
      break;
    case 'stylus':
      this.copy('public/stylesheets/_style.styl', 'public/stylesheets/style.styl');<commit_msg>fixing other stylesheet setups<commit_after>'use strict';
var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');


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

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

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

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

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

  // have Yeoman greet the user.
  console.log(this.yeoman);

  var prompts = [
    {
      name: 'siteName',
      message: 'What is the name of the site you are creating?',
      default: 'express-static'
    },
    {
      name: 'viewEngine',
      message: 'Which view engine would you like to use?',
      type: 'list',
      default: 'jade',
      choices: [
        {
          name: 'jade',
          value: 'jade'
        },
        {
          name: 'handlebars',
          value: 'hbs'
        }
      ]
    },
    {
      name: 'cssEngine',
      message: 'Which css engine would you like to use?',
      type: 'list',
      default: 'stylus',
      choices: [
        {
          name: 'stylus',
          value: 'stylus'
        },
        {
          name: 'sass',
          value: 'sass'
        },
        {
          name: 'less',
          value: 'less'
        },
        {
          name: 'css',
          value: 'css'
        }
      ]
    }
  ];

  this.prompt(prompts, function (props) {

    this.siteName = props.siteName;
    this.viewEngine = props.viewEngine;
    this.cssEngine = props.cssEngine;

    cb();
  }.bind(this));
};

ExpressStaticGenerator.prototype.app = function app() {
  this.mkdir('e2e');
  this.mkdir('public');
  this.mkdir('public/images');
  this.mkdir('public/stylesheets');
  this.mkdir('public/javascripts');
  this.mkdir('resources');
  this.mkdir('resources/stylesheets');
  this.mkdir('routes');
  this.mkdir('views');
  this.mkdir('views/partials');

  switch (this.cssEngine){
    case 'sass':
      this.copy('public/stylesheets/_style.scss', 'resources/stylesheets/style.scss');
      break;
    case 'less':
      this.copy('public/stylesheets/_style.less', 'resources/stylesheets/style.less');
      break;
    case 'stylus':
      this.copy('public/stylesheets/_style.styl', 'resources/stylesheets/style.styl');
{'fraction_non_alphanumeric': 0.1551213735938425, 'fraction_numerical': 0.00039471087428458656, 'mean_word_length': 2.4617486338797816, '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': '2699091', 'n_tokens_mistral': 1629, 'n_tokens_neox': 1570, 'n_words': 312}