{"size": 1624, "ext": "js", "max_stars_repo_path": "app/index.js", "max_stars_repo_name": "madtec-dev/generator-inuit", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/index.js", "max_issues_repo_name": "madtec-dev/generator-inuit", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/index.js", "max_forks_repo_name": "madtec-dev/generator-inuit", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.8823529412, "max_line_length": 78, "alphanum_fraction": 0.5387931034}
'use strict';
var path = require('path');
var generators = require('yeoman-generator');

module.exports = generators.Base.extend({
  constructor: function () {
    generators.Base.apply(this, arguments);

    // add option to skip install
    this.option('skip-install');

  },
  prompting: {

    inuit: function () {
        var done = this.async();
        var prompt = [{
          type: 'confirm',
          name: 'inuit',
          message: 'Do you want to use Inuit CSS?',
        }];

        this.prompt(prompt, function (response) {
          if(response.inuit === true) {
            this.options.inuit = response.inuit;
          }
          else {
            return;
          }
          done();
        }.bind(this));
    }
  },
  
  writing: {
    buildEnv: function () {


      // shared across all generators
      this.sourceRoot(path.join(__dirname, 'templates', 'shared'));
      this.expandFiles('**', { cwd: this.sourceRoot() }).map(function (file) {
        this.template(file, file.replace(/^_/, ''));
      }, this);

      // handlebars
      this.sourceRoot(path.join(__dirname, 'templates', 'hbs'));
      this.directory('.', 'views/layouts');


      // css
      var inuit = this.options.inuit;
      if( inuit === true ) {
        console.log('inuit');
        this.sourceRoot(path.join(__dirname, 'templates', 'css', 'inuit'));
      }
      this.directory('.', 'public/css');
    },
    assetsDirs: function () {
      this.mkdir('public');
      this.mkdir('public/components');
      this.mkdir('public/css');
    }
  },
  install: function () {
    this.installDependencies();
  }
});
