<commit_before>'use strict'

var yeoman = require('yeoman-generator');
var path = require('path');
var util = require('util');
var chalk = require('chalk');
var mkdirp = require('mkdirp');


var LandingpageGenerator = yeoman.Base.extend({
  constructor: function() {
    yeoman.Base.apply(this, arguments);
  },
  initializing: function() {
    console.log('Welcome to the Landing Page Generator');
    mkdirp.sync('landing');
    mkdirp.sync('landing/app/css');
    mkdirp.sync('landing/app/sections');
    mkdirp.sync('landing/app/css/sass');
    mkdirp.sync('landing/app/js');
  },
  prompting: function() {
    var done = this.async();

    var prompts = [{
      name: 'title',
      message: 'What is your landing page title?',
      default: 'The Great Landing Page!'
    }, {
      name: 'slogan',
      message: 'What is your slogan?',
      default: 'My Great Landing Page with an Awesome Slogan!'
    }];

    this.prompt(prompts, function( props ) {
      this.title = props.title;
      this.slogan = props.slogan;

      done();

    }.bind(this));
  },
  writing: function() {
    this.fs.copy(
      this.templatePath('sass/**'),
      this.destinationPath('landing/app/css/sass')
    )
    this.fs.copy(
      this.templatePath('_footer.html'),
      this.destinationPath('landing/app/footer.html')
    );
    this.fs.copy(
      this.templatePath('_GruntFile.js'),
      this.destinationPath('landing/GruntFile.js')
    );
    this.fs.copy(
      this.templatePath('_package.json'),
      this.destinationPath('landing/package.json')
    );
    this.fs.copy(
      this.templatePath('_bower.json'),
      this.destinationPath('landing/bower.json')
    );
    this.fs.copy(
      this.templatePath('_.bowerrc'),
      this.destinationPath('landing/.bowerrc')
    );
    this.fs.copyTpl(
      this.templatePath('_header.html'),
      this.destinationPath('landing/app/header.html'),
      { landing_title: this.title }
    );
  },
  install: function() {
    this.destinationRoot('landing');
    this.installDependencies();
  },
  end: function() {
    this.composeWith('landing-page:section', { args: ['intro'] })
  }
});

module.exports = LandingpageGenerator;<commit_msg>Added the ability to pass an argument as project name<commit_after>'use strict'

var yeoman = require('yeoman-generator');
var path = require('path');
var util = require('util');
var chalk = require('chalk');
var mkdirp = require('mkdirp');

var LandingpageGenerator = yeoman.Base.extend({
  constructor: function() {
    yeoman.Base.apply(this, arguments);

    // Get app name (project root folder name) via arguments
    this.argument('appName', { type: String, required: true });
    this.appname = this.appName;
  },
  initializing: function() {
    console.log('Welcome to the Landing Page Generator');
    mkdirp.sync(this.appName);
    mkdirp.sync(this.appName + '/app/css');
    mkdirp.sync(this.appName + '/app/sections');
    mkdirp.sync(this.appName + '/app/css/sass');
    mkdirp.sync(this.appName + '/app/js');
  },
  prompting: function() {
    var done = this.async();

    var prompts = [{
      name: 'title',
      message: 'What is your landing page title?',
      default: 'The Great Landing Page!'
    }, {
      name: 'slogan',
      message: 'What is your slogan?',
      default: 'My Great Landing Page with an Awesome Slogan!'
    }];

    this.prompt(prompts, function( props ) {
      this.title = props.title;
      this.slogan = props.slogan;

      done();

    }.bind(this));
  },
  writing: function() {
    this.fs.copy(
      this.templatePath('sass/**'),
      this.destinationPath(this.appName + '/app/css/sass')
    )
    this.fs.copy(
      this.templatePath('_footer.html'),
      this.destinationPath(this.appName + '/app/footer.html')
    );
    this.fs.copy(
      this.templatePath('_GruntFile.js'),
      this.destinationPath(this.appName + '/GruntFile.js')
    );
    this.fs.copy(
      this.templatePath('_package.json'),
      this.destinationPath(this.appName + '/package.json')
    );
    this.fs.copy(
      this.templatePath('_bower.json'),
      this.destinationPath(this.appName + '/bower.json')
    );
    this.fs.copy(
      this.templatePath('_.bowerrc'),
      this.destinationPath(this.appName + '/.bowerrc')
    );
    this.fs.copyTpl(
      this.templatePath('_header.html'),
      this.destinationPath(this.appName + '/app/header.html'),
      { landing_title: this.title }
    );
  },
  install: function() {
    this.destinationRoot(this.appName);
    this.installDependencies();
  },
  end: function() {
    this.composeWith('landing-page:section', { args: ['intro'] })
  }
});

module.exports = LandingpageGenerator;
{'fraction_non_alphanumeric': 0.16388532306375694, 'fraction_numerical': 0.0, 'mean_word_length': 3.023235800344234, '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': '1913194', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1510, 'n_words': 273}