<commit_before>const inquirer = require('inquirer')
const mkdirp = require('mkdirp')
const Listr = require('listr')
const { createThemeTasks, createThemePrompt } = require('./../themeTasks')
const { getVsfPackageJSON } = require('./../helpers')

module.exports = function () {
  const { cloneTheme, installDeps, configureTheme } = createThemeTasks()

  inquirer
    .prompt([
      {
        type: 'input',
        name: 'vsf_dir',
        message: 'Please provide path to vue-storefront directory',
        default: '.',
        validate: function (value) {
          const { name } = getVsfPackageJSON(value, true)
          if (name !== 'vue-storefront') {
            return 'Provided directory is not vue-storefront directory'
          }

          return true
        }
      },
      ...createThemePrompt()
    ])
    .then(answers => {
      new Listr([
        cloneTheme,
        installDeps,
        configureTheme
      ]).run(answers)<commit_msg>move create task after prompt<commit_after>const inquirer = require('inquirer')
const mkdirp = require('mkdirp')
const Listr = require('listr')
const { createThemeTasks, createThemePrompt } = require('./../themeTasks')
const { getVsfPackageJSON } = require('./../helpers')

module.exports = function () {
  inquirer
    .prompt([
      {
        type: 'input',
        name: 'vsf_dir',
        message: 'Please provide path to vue-storefront directory',
        default: '.',
        validate: function (value) {
          const { name } = getVsfPackageJSON(value, true)
          if (name !== 'vue-storefront') {
            return 'Provided directory is not vue-storefront directory'
          }

          return true
        }
      },
      ...createThemePrompt()
    ])
    .then(answers => {
      const { cloneTheme, installDeps, configureTheme } = createThemeTasks(answers.vsf_dir)

      new Listr([
        cloneTheme,
        installDeps,
        configureTheme
      ]).run(answers)
{'fraction_non_alphanumeric': 0.12736572890025574, 'fraction_numerical': 0.0, 'mean_word_length': 2.3608247422680413, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6798262', 'n_tokens_mistral': 570, 'n_tokens_neox': 553, 'n_words': 131}