<commit_before>'use strict';

var yeoman  = require('yeoman-generator');
var prompts = require('../../utils/prompts.js');

module.exports = yeoman.generators.Base.extend({

  type: 'export',

  location: 'exports',

  stylesheets: ['export'],

  initializing: function () {
    this.argument('name', {
      required: false,
      type: String
    });
  },

  prompting: function () {
    if (!this.name) {
      prompts.askName.apply(this, [this.type, function(answer) {
        this.name = answer;
        done();
      }.bind(this)]);
    }
  },

  configuring: function () {
    this.filePaths = this.stylesheets.map(function(file) {
      return {
        dest: this.location + '/' + this.name + '.scss',
        src: '_' + file + '.scss'
      };
    }.bind(this));
  },

  writing: function () {
    this.filePaths.forEach(function(path) {
      this.fs.copy(this.templatePath(path.src), this.destinationPath(path.dest));
    }.bind(this));
  },<commit_msg>fixes a 'done() not defined' error<commit_after>'use strict';

var yeoman  = require('yeoman-generator');
var prompts = require('../../utils/prompts.js');

module.exports = yeoman.generators.Base.extend({

  type: 'export',

  location: 'exports',

  stylesheets: ['export'],

  initializing: function () {
    this.argument('name', {
      required: false,
      type: String
    });
  },

  prompting: function () {
    var done = this.async();

    if (!this.name) {
      prompts.askName.apply(this, [this.type, function(answer) {
        this.name = answer;
        done();
      }.bind(this)]);
    }
  },

  configuring: function () {
    this.filePaths = this.stylesheets.map(function(file) {
      return {
        dest: this.location + '/' + this.name + '.scss',
        src: '_' + file + '.scss'
      };
    }.bind(this));
  },

  writing: function () {
    this.filePaths.forEach(function(path) {
      this.fs.copy(this.templatePath(path.src), this.destinationPath(path.dest));
    }.bind(this));
  },
{'fraction_non_alphanumeric': 0.18342597271349168, 'fraction_numerical': 0.0, 'mean_word_length': 2.680297397769517, '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': '4637989', 'n_tokens_mistral': 664, 'n_tokens_neox': 636, 'n_words': 114}