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

var foldername = path.basename(process.cwd());

var CppSuiteGenerator = module.exports = function CppSuiteGenerator(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(CppSuiteGenerator, yeoman.generators.Base);

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

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

  var prompts = [{
    name: 'namespace',
    message: 'What is the namespace you want to use?',
    default: 'OpenMagento'
  }, {
    name: 'moduleName',
    message: 'What is the name of the module:',
    default: 'MyModule'
  }, 
  {
    type: 'select',
    name: 'codePool',
    message: 'Which code pool do you want to use?',
    choices: [
      {name: "Local", value: "local"},
      {name: "Community", value: "community"}
    ],
    default: 'community'
  },
  {
    name: 'author',
    message: 'Who is the creator?',
    default: 'Someone'
  }];

  this.prompt(prompts, function (props) {
    this.namespace = props.namespace;
    this.moduleName = props.moduleName;
    this.codePool = props.codePool;
    this.author = props.author;
    cb();
  }.bind(this));
};

@@ -158,23 +158,25 @@
 );%0A%0Avar 
-CppSuit
+MageModul
 eGenerat
@@ -206,23 +206,25 @@
 unction 
-CppSuit
+MageModul
 eGenerat
@@ -518,23 +518,25 @@
 nherits(
-CppSuit
+MageModul
 eGenerat
@@ -569,15 +569,17 @@
 );%0A%0A
-CppSuit
+MageModul
 eGen
@@ -1484,12 +1484,387 @@
 (this));%0A%7D;%0A
+%0AMageModuleGenerator.prototype.app = function app() %7B%0A    this.mkdir('app');%0A    this.mkdir('app/etc');%0A    this.mkdir('app/etc/modules');%0A    this.mkdir('app/code');%0A    this.mkdir('app/code/' + this.codePool);%0A    this.mkdir('app/code/' + this.codePool + '/' + this.namespace);%0A    this.mkdir('app/code/' + this.codePool + '/' + this.namespace + '/' + this.moduleName);%0A%7D;%0A

Add code to automatically generate directories