constructor()

in generators/app/index.js [14:42]


  constructor(args, opts) {
    super(args, opts);
    this.argument("destination", {
      type: String,
      required: true,
      description: "Destination directory where the demo will be generated"
    });
    this.destinationRoot(this.options.destination);
    this.props = this.options;
    this.props.generatorId = 'dbroeglin/generator-az-ai'
    this.props.generatorVersion = pkg.version;
    this.props.pythonVersion = '3.12';

    [
      BackendGenerator,
      FrontendGenerator,
      PackageGenerator,
      GitHubGenerator,
    ].forEach((subgen) => {
      if (subgen.name === 'default') {
        throw new Error('Make sure you named your subgenerator class.');
      }
      const moduleName = us.dasherize(us.decapitalize(subgen.name.replace('Generator', '')))
      this.composeWith(
        { Generator: subgen, path: `../${moduleName}/index.js` },
        { parent: this, ...this.options }
      );
    });
  }