<commit_before>'use strict';

module.exports = function(kbox) {

  // Npm mods
  var _ = require('lodash');

  // Pkg.json
  var pkgJson = require('./package.json');

  var backdropMatrix = {
    '1': {
      php: '5.3.29',
      drush: 'backdrush'
    }
  };

  // Declare our app to the world
  kbox.create.add('backdrop', {
    task: {
      name: 'Backdrop',
      module: 'kalabox-app-backdrop',
      description: 'Creates a backdrop app.'
    }
  });

  // Add an option
  kbox.create.add('backdrop', {
    option: {
      name: 'name',
      weight: -99,
      task: {
        kind: 'string',
        description: 'The name of your app.',
      },
      inquire: {
        type: 'input',
        message: 'What will this app be called',
        validate: function(value) {
          // @todo some actual validation here
          return true;
        },
        filter: function(value) {
          return _.kebabCase(value);
        },
        default: 'My Backdrop App'
      },
      conf: {
        type: 'global',
        key: 'appName'
      }
    }
  });

  // Load php things
  require(pkgJson.postInstallAssets['kalabox-plugin-php'].create)(
    kbox,
    _.merge(
      {},
      backdropMatrix,
      {
        '2': {php: '5.4.40'},
        '3': {php: '5.5.24'}
      }
    ),
    'backdrop'
  );

  // Load git things
  require(pkgJson.postInstallAssets['kalabox-plugin-git'].create)(
    kbox,
    'backdrop'
  );<commit_msg>#446: Update to reflect actual vendor paths<commit_after>'use strict';

module.exports = function(kbox) {

  // Instrinsc modules
  var path = require('path');

  var backdropMatrix = {
    '1': {
      php: '5.3.29',
      drush: 'backdrush'
    }
  };

  // Declare our app to the world
  kbox.create.add('backdrop', {
    task: {
      name: 'Backdrop',
      module: 'kalabox-app-backdrop',
      description: 'Creates a backdrop app.'
    }
  });

  // Add an option
  kbox.create.add('backdrop', {
    option: {
      name: 'name',
      weight: -99,
      task: {
        kind: 'string',
        description: 'The name of your app.',
      },
      inquire: {
        type: 'input',
        message: 'What will this app be called',
        validate: function(value) {
          // @todo some actual validation here
          return true;
        },
        filter: function(value) {
          return _.kebabCase(value);
        },
        default: 'My Backdrop App'
      },
      conf: {
        type: 'global',
        key: 'appName'
      }
    }
  });

  // Load php things
  var phpPluginName = 'kalabox-plugin-php'
  var phpCreatePath = pkgJson.postInstallAssets[phpPluginName].create;
  var phpCreateFile = require('./' + path.join('vendor', phpPluginName, phpCreatePath));
  require(phpCreateFile)(
    kbox,
    _.merge(
      {},
      backdropMatrix,
      {
        '2': {php: '5.4.40'},
        '3': {php: '5.5.24'}
      }
    ),
    'backdrop'
  );

  // Load git things
  var gitPluginName = 'kalabox-plugin-git'
  var gitCreatePath = pkgJson.postInstallAssets[phpPluginName].create;
  var gitCreateFile = require('./' + path.join('vendor', gitPluginName, gitCreatePath));
  require(pkgJson.postInstallAssets['kalabox-plugin-git'].create)(
    kbox,
    'backdrop'
  );
{'fraction_non_alphanumeric': 0.15013901760889714, 'fraction_numerical': 0.01143033673154155, 'mean_word_length': 1.9981481481481482, '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': '386518', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1064, 'n_words': 239}