<commit_before>'use strict'
yeoman = require 'yeoman-generator'
chalk = require 'chalk'
yosay = require 'yosay'
fs = require 'fs'

inArray = (value,array)->
  for val in array
    return true if val is value
  return false

sortPrompts=(a,b)->
  return 1 if a.name>b.name
  return -1 if b.name>a.name
  return 0
module.exports = yeoman.generators.Base.extend {

  # Your initialization methods (checking current project state, getting configs, etc)
  initializing: ->
    @pkg = require '../package.json'
    return


  # Where you prompt users for options (where you'd call this.prompt())
  prompting:
    welcome: ->

      # Have Yeoman greet the user.
      @log yosay 'Welcome to the fantastic '+chalk.red('WebappKit')+' generator!'
      return

    name: ->
      _appname = @appname
      done = @async()
      prompts = [
        type: 'input'
        name: 'appName'
        message: 'What is your app name'
        default: _appname
      ]
      @prompt prompts, ((props) ->
        props.appName = props.appName.replace /\s/g,'-'
        @config.set props
        done()
        return
      ).bind(this)
      return

    authors: ->
      done = @async()
      prompt = [
        type: 'input'
        name: 'authors'
        message: 'Author: '
        store:true
      ]
      @prompt prompt, ((props) ->
        @config.set props
        done()
        return
      ).bind(this)
      return

    description: ->
      done = @async()
      prompt = [
        type: 'input'
        name: 'description'
        message: 'Description: '
      ]
      @prompt prompt, ((props) ->
        @config.set props
        done()
        return
      ).bind(this)
      return

    license: ->
      done = @async()
      prompt = [
        type: 'input'
        name: 'license'
        message: 'License: '
        default: 'MIT'
      ]
      @prompt prompt, ((props) ->
        @config.set props
        done()
        return
      ).bind(this)
      return

    plugins: ->
      done = @async()
      prompt = [
        type: 'checkbox'
        name: 'plugins'
        message: 'Select plugins: '
        choices: [
          {
            name: 'Bootstrap'
            value: {
              name: 'bootstrap'
              installer: 'npm'
            }
          }
          {
            name: 'Pure.css'
            value: {
              name: 'purecss'
              installer: 'npm'
            }
          }
          {
            name: 'Modernizr'
            value:
              name: 'modernizr'
              installer: 'npm'
          }
          {
            name: 'Normalize.css'
            value: {
              name: 'normalize.css'
              installer: 'npm'
            }
          }
          {
            name: 'jQuery'
            value: {
              name: 'jquery'
              installer: 'npm'
            }
          }
          {
            name: 'AngularJS'
            value: {
              name: 'angular'
              installer: 'npm'<commit_msg>delete modernizr<commit_after>'use strict'
yeoman = require 'yeoman-generator'
chalk = require 'chalk'
yosay = require 'yosay'
fs = require 'fs'

inArray = (value,array)->
  for val in array
    return true if val is value
  return false

sortPrompts=(a,b)->
  return 1 if a.name>b.name
  return -1 if b.name>a.name
  return 0
module.exports = yeoman.generators.Base.extend {

  # Your initialization methods (checking current project state, getting configs, etc)
  initializing: ->
    @pkg = require '../package.json'
    return


  # Where you prompt users for options (where you'd call this.prompt())
  prompting:
    welcome: ->

      # Have Yeoman greet the user.
      @log yosay 'Welcome to the fantastic '+chalk.red('WebappKit')+' generator!'
      return

    name: ->
      _appname = @appname
      done = @async()
      prompts = [
        type: 'input'
        name: 'appName'
        message: 'What is your app name'
        default: _appname
      ]
      @prompt prompts, ((props) ->
        props.appName = props.appName.replace /\s/g,'-'
        @config.set props
        done()
        return
      ).bind(this)
      return

    authors: ->
      done = @async()
      prompt = [
        type: 'input'
        name: 'authors'
        message: 'Author: '
        store:true
      ]
      @prompt prompt, ((props) ->
        @config.set props
        done()
        return
      ).bind(this)
      return

    description: ->
      done = @async()
      prompt = [
        type: 'input'
        name: 'description'
        message: 'Description: '
      ]
      @prompt prompt, ((props) ->
        @config.set props
        done()
        return
      ).bind(this)
      return

    license: ->
      done = @async()
      prompt = [
        type: 'input'
        name: 'license'
        message: 'License: '
        default: 'MIT'
      ]
      @prompt prompt, ((props) ->
        @config.set props
        done()
        return
      ).bind(this)
      return

    plugins: ->
      done = @async()
      prompt = [
        type: 'checkbox'
        name: 'plugins'
        message: 'Select plugins: '
        choices: [
          {
            name: 'Bootstrap'
            value: {
              name: 'bootstrap'
              installer: 'npm'
            }
          }
          {
            name: 'Pure.css'
            value: {
              name: 'purecss'
              installer: 'npm'
            }
          }
          {
            name: 'Normalize.css'
            value: {
              name: 'normalize.css'
              installer: 'npm'
            }
          }
          {
            name: 'jQuery'
            value: {
              name: 'jquery'
              installer: 'npm'
            }
          }
          {
            name: 'AngularJS'
            value: {
              name: 'angular'
              installer: 'npm'
{'fraction_non_alphanumeric': 0.11570529181555216, 'fraction_numerical': 0.0010209290454313426, 'mean_word_length': 1.3096267190569744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, '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': '3168213', 'n_tokens_mistral': 1751, 'n_tokens_neox': 1691, 'n_words': 445}