src/installer.js
/**
   * Flattens and merges default values, CLI-supplied options, and API-supplied options.
   */
Flattens and merges default values, CLI-supplied options, and API-supplied options.
Flattens and merges default values CLI - supplied options and API - supplied options .
generateOptions () {
    super.generateOptions()
    this.options.name = this.sanitizeName(this.options.name)
    if (!this.options.description && !this.options.productDescription) {
      throw new Error("No Description or ProductDescription provided. Please set either a description in the app's package.json or provide it in the this.options.")
    }
    if (this.options.description) {
      this.options.description = this.normalizeDescription(this.options.description)
    }
    if (this.options.productDescription) {
      this.options.productDescription = this.normalizeExtendedDescription(this.options.productDescription)
    }
    for (const prop of ['depends', 'recommends', 'suggests', 'enhances', 'preDepends']) {
      this.options[prop] = common.mergeUserSpecified(this.userSupplied, prop, this.defaults)
    }
    return this.options
  }
generateOptions ( ) { super . generateOptions ( ) this . options . name = this . sanitizeName ( this . options . name ) if ( ! this . options . description && ! this . options . productDescription ) { throw new Error ( "No Description or ProductDescription provided. Please set either a description in the app's package.json or provide it in the this.options." ) } if ( this . options . description ) { this . options . description = this . normalizeDescription ( this . options . description ) } if ( this . options . productDescription ) { this . options . productDescription = this . normalizeExtendedDescription ( this . options . productDescription ) } for ( const prop of [ 'depends' , 'recommends' , 'suggests' , 'enhances' , 'preDepends' ] ) { this . options [ prop ] = common . mergeUserSpecified ( this . userSupplied , prop , this . defaults ) } return this . options }
Flattens and merges default values, CLI-supplied options, and API-supplied options.
Flattens and merges default values CLI - supplied options and API - supplied options .
// Create array with unique values from default & user-supplied dependencies