async _promptingPackage()

in generators/package/index.js [31:63]


  async _promptingPackage(answers) {
      this.props.withPackage = ((answers.withPackage || this.props.withPackage) + '').toLowerCase() === 'true'
      const prompts = this.props.withPackage
        ? [
          {
            type: "string",
            name: "packageName",
            message: "What is your package's name?",
            default: () => `${this.props.solutionName} Core`,
            when: (answers) => !this.options.hasOwnProperty("packageName"),
          },
          {
            type: "string",
            name: "packageDescription",
            message: "What is the description of your package?",
            default: (answers) => `Description of ${answers.packageName || this.props.packageName}`,
            when: (answers) => !this.options.hasOwnProperty("packageDescription"),
          },
          {
            type: "string",
            name: "packageSlug",
            message: "What is the slug of your package?",
            default: (answers) => us.slugify(answers.packageName || this.props.packageName),
            validate: (input) => us.slugify(input) === input,
            when: (answers) => !this.options.hasOwnProperty("packageSlug"),
          },
        ]
        : [];
        return this.prompt(prompts).then(answers => {
          this.parent.props = { ...this.props, ...answers };
          this.parent.props.packagePythonName = us.underscored(this.parent.props.packageSlug);
        });
    };