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,cAGpC,KAAK,KAAK,eAAgB,iBAC1B,KAAK,KAAK,eAAgB,iBAC1B,KAAK,KAAK,YAAa,cACvB,KAAK,KAAK,WAAY,aAGtB,IAAI,EAAO,CAAC,KAAK,SAAU,KAAK,YAAa,KAAK,QAAS,KAAK,OAAQ,KAAK,QAC7E,IAAK,IAAI,KAAK,EACZ,KAAK,KAAK,UAAW,EAAK,GAAK,YAEnC,EAEA,qBAAqB,UAAU,OAAS,WACtC,GAAI,KAAK,aAAa,QAAU,EAAG,CACjC,IAAI,EAAK,KAAK,QAGd,KAAK,OAAO,sBAAuB,CAAC,QAAS,CAAC,QAAQ,EAAM,aAAc,KAAK,eAAgB,EACjG,CACF,EAEA,qBAAqB,UAAU,eAAiB,WAC9C,IAAI,EAAqB,KAAK,mBAG9B,GAAI,EAAoB,CACtB,IAAI,EAAK,KAAK,QAGd,KAAK,OAAO,EAAoB,CAAC,QAAS,CAAC,QAAQ,IAAQ,EAC7D,CACF,EAEA,OAAO,QAAU","file":"/npm/generator-drupal-theme@0.1.7/app/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/generator-drupal-theme@0.1.7/app/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\nvar util = require('util');\nvar path = require('path');\nvar yeoman = require('yeoman-generator');\nvar yosay = require('yosay');\nvar chalk = require('chalk');\nvar exec = require('sync-exec');\nvar _s = require('underscore.string');\nvar fs = require('fs');\n\nvar extras = require('../extras/extras.js');\n\n// Here, we add in extra prompts and settings from our base themes.\nvar baseThemeList = [\n  { name: \"No Base Theme\", value: null },\n  { name: \"Zen\", value: \"zen\", generator: \"drupal-theme:zen\"},\n  { name: \"Aurora\", value: \"aurora\", file: \"../aurora/Aurora.js\", generator: \"drupal-theme:aurora\" },\n  { name: \"Omega 4.x\", value: \"omega\" },\n  { name: \"Mothership\", value: \"mothership\"},\n  { name: \"Custom\", value: \"CUSTOM\"}\n];\n\n\nvar DrupalThemeGenerator = yeoman.generators.Base.extend({\n  init: function () {\n    this.pkg = require('../package.json');\n\n    this.on('end', function () {\n      //////////////////////////////\n      // Move Yo Storage\n      //////////////////////////////\n      fs.renameSync('../.yo-rc.json', '.yo-rc.json');\n\n      //////////////////////////////\n      // If the --skip-install flag is NOT passed, install our bundler\n      // dependencies.\n      // NOTE: This happens in a local folder because there is less of a chance\n      //       of it breaking there.\n      //////////////////////////////\n      if (!this.options['skip-install']) {\n        exec('bundle install --path .vendor/bundle');\n\n        //////////////////////////////\n        // If the --skip-compass flag is NOT passed, run compass compile\n        //////////////////////////////\n        if (!this.options['skip-compass']) {\n          exec('bundle exec compass compile');\n        }\n      }\n\n      //////////////////////////////\n      // If the --git flag is passed, initialize git and add for initial commit\n      //////////////////////////////\n      if (this.options['git']) {\n        exec('git init');\n        exec('git add . && git commit -m \"Aurora Generation\"');\n      }\n    });\n  }\n});\n\nDrupalThemeGenerator.prototype.askForBase = function () {\n  var cb = this.async();\n\n  if (!this.options['skip-welcome-message']) {\n\n    // Have Yeoman greet the user.\n    this.log(yosay('Welcome to the Drupal theme generator!'));\n    this.log(\n      chalk.green(\n        'With this you can create the scaffolding for your own Drupal theme. This also has custom code to create starter kits from several major base themes. ' + '\\n'\n      )\n    );\n  }\n\n  var prompts = [\n    {\n      type: 'string',\n      name: 'projectName',\n      message: 'What\\'s your theme\\'s name?' + chalk.red(' (Required)'),\n      validate: function (input) {\n        if (input === '') {\n          return 'Please enter your theme\\'s name';\n        }\n        return true;\n      }\n    },\n    {\n      type: 'list',\n      name: 'baseTheme',\n      message: 'Which base theme would you like to use?',\n      choices: baseThemeList,\n      default: null,\n    },\n    {\n      type: 'string',\n      name: 'customBaseTheme',\n      message: 'What is the system name of the base theme?',\n      when: function( answers ) {\n        return (answers.baseTheme === \"CUSTOM\");\n      }\n    }\n  ];\n\n  this.prompt(prompts, function (props) {\n    this.projectName = props.projectName;\n    this.projectSlug = _s.underscored(props.projectName);\n    this.baseTheme = props.baseTheme;\n\n    // We have a custom base theme, just set it.\n    if (this.baseTheme === \"CUSTOM\") {\n      this.baseTheme = props.customBaseTheme;\n    }\n\n    this.config.set('projectName', this.projectName);\n    this.config.set('projectSlug', this.projectSlug);\n    this.config.set('baseTheme', this.baseTheme);\n\n    cb();\n  }.bind(this));\n};\n\nDrupalThemeGenerator.prototype.askForSubs = function() {\n  var cb = this.async();\n  var baseTheme = this.baseTheme;\n  var baseThemeConfig = null;\n  var baseThemeGenerator = false;\n\n  baseThemeList.forEach( function(element, index, array) {\n    if (element.value == baseTheme) {\n      if (element.file != undefined) {\n        baseThemeConfig = require(element.file);\n      }\n\n      if (element.generator != undefined) {\n        baseThemeGenerator = element.generator;\n      }\n    }\n  });\n\n  this.baseThemeGenerator = baseThemeGenerator;\n\n  // We do not want to try and get more options if they do not exist.\n  if (baseThemeConfig !== null) {\n    var prompts = baseThemeConfig.askFor();\n    this.prompt(prompts, function (props) {\n      this.baseThemeSettings = props;\n      this.config.set('baseThemeSettings', this.baseThemeSettings);\n\n      cb();\n    }.bind(this));\n  }\n  else {\n    cb();\n  }\n};\n\nDrupalThemeGenerator.prototype.askForAdvanced = function() {\n  var cb = this.async();\n  var onlyWhen = function( answers ) {\n    return answers.advFileOptions;\n  }\n\n  // First, set our general defaults.\n  this.sassDir = 'sass';\n  this.cssDir = 'css';\n  this.jsDir = 'js';\n  this.imgDir = 'img';\n  this.fontsDir = 'fonts';\n  this.templateDir = 'tpl';\n\n  this.prompt([\n    {\n      type: \"confirm\",\n      name: \"advFileOptions\",\n      message: \"Do you want to customize your theme's directories?\",\n      default: false\n    },\n    {\n      type: \"input\",\n      name: \"sassDir\",\n      message: \"Sass directory?\",\n      default: this.sassDir,\n      when: onlyWhen\n    },\n    {\n      type: \"input\",\n      name: \"cssDir\",\n      message: \"CSS directory?\",\n      default: this.cssDir,\n      when: onlyWhen\n    },\n    {\n      type: \"input\",\n      name: \"jsDir\",\n      message: \"JavaScript directory?\",\n      default: this.jsDir,\n      when: onlyWhen\n    },\n    {\n      type: \"input\",\n      name: \"imgDir\",\n      message: \"Images directory?\",\n      default: this.imgDir,\n      when: onlyWhen\n    },\n    {\n      type: \"input\",\n      name: \"fontsDir\",\n      message: \"Fonts directory?\",\n      default: this.fontsDir,\n      when: onlyWhen\n    },\n    {\n      type: \"list\",\n      name: \"templateDir\",\n      message: \"Template directory?\",\n      choices: ['tpl', 'templates'],\n      default: this.templateDir,\n      when: onlyWhen\n    }\n  ], function (props) {\n\n    // If they wanted the advanced options, use those.\n    if (props.advFileOptions) {\n      // TODO: Instead, make sure the input is sanitized already?\n      this.sassDir = _s.underscored(props.sassDir);\n      this.cssDir = _s.underscored(props.cssDir);\n      this.jsDir = _s.underscored(props.jsDir);\n      this.imgDir = _s.underscored(props.imgDir);\n      this.fontsDir = _s.underscored(props.fontsDir);\n      this.templateDir = props.templateDir;\n    }\n\n    this.config.set('sassDir', this.sassDir);\n    this.config.set('cssDir', this.cssDir);\n    this.config.set('jsDir', this.jsDir);\n    this.config.set('imgDir', this.imgDir);\n    this.config.set('fontsDir', this.fontsDir);\n    this.config.set('templateDir', this.templateDir);\n\n    cb();\n  }.bind(this));\n};\n\nDrupalThemeGenerator.prototype.askForExtras = function() {\n  var cb = this.async();\n\n  var prompts = extras.askFor();\n\n  this.prompt(prompts, function (props) {\n    this.extraOptions = props.extraOptions;\n\n    cb();\n\n  }.bind(this));\n\n};\n\nDrupalThemeGenerator.prototype.drupal = function () {\n  // Create our theme directory\n  this.mkdir(this.projectSlug);\n  // Set our destination to be the new directory.\n  this.destinationRoot(this.projectSlug);\n\n  // Make all the directories we know that we will need.\n  this.mkdir(this.sassDir);\n  this.mkdir(this.cssDir);\n  this.mkdir(this.jsDir);\n  this.mkdir(this.imgDir);\n  this.mkdir(this.fontsDir);\n  this.mkdir(this.templateDir);\n\n  // General theme files.\n  this.template('_theme.info', this.projectSlug + '.info');\n  this.template('_template.php', 'template.php');\n  this.template('_theme_settings.php', 'theme-settings.php');\n  this.copy('favicon.ico', 'favicon.ico');\n\n  // Compass settings file.\n  this.template('_config.rb', 'config.rb');\n  this.copy('Gemfile', 'Gemfile');\n\n  // Sample JavaScript file.\n  this.copy('script.js', this.jsDir + '/script.js');\n\n  // Some config files we want to have.\n  this.copy('editorconfig', '.editorconfig');\n  this.copy('ruby-version', '.ruby-version');\n  this.copy('gitignore', '.gitignore');\n  this.copy('jshintrc', '.jshintrc');\n\n  // Keep all of our folders in git, in case we didn't put something in there.\n  var keep = [this.fontsDir, this.templateDir, this.sassDir, this.cssDir, this.imgDir];\n  for (var i in keep) {\n    this.copy('gitkeep', keep[i] + '/.gitkeep');\n  }\n};\n\nDrupalThemeGenerator.prototype.extras = function() {\n  if (this.extraOptions.length >= 1) {\n    var cb = this.async();\n\n    // Call the extras generator.\n    this.invoke(\"drupal-theme:extras\", {options: {nested: true, extraOptions: this.extraOptions}}, cb);\n  }\n}\n\nDrupalThemeGenerator.prototype.baseThemeSetup = function () {\n  var baseThemeGenerator = this.baseThemeGenerator;\n\n  // Run commands from base theme generators.\n  if (baseThemeGenerator) {\n    var cb = this.async();\n\n    // Call the base theme generator.\n    this.invoke(baseThemeGenerator, {options: {nested: true}}, cb);\n  }\n}\n\nmodule.exports = DrupalThemeGenerator;\n"]}