in generators/module/index.js [61:124]
async prompting() {
let answers = await this.prompt([
{
name: 'solutionName',
message: msg.solutionName.prompt,
default: this.options.solutionName || this.appname,
when: !this.options.solutionName,
},
{
type: 'list',
name: 'moduleType',
message: msg.moduleType.prompt,
default: 'Feature',
choices: moduleTypes,
when: !this.options.moduleType,
},
{
name: 'moduleName',
message: msg.moduleName.prompt,
when: !this.options.moduleName,
},
{
type: 'list',
name: 'sitecoreVersion',
message: msg.sitecoreVersion.prompt,
default: this.options.sitecoreVersion,
choices: versions,
when: !this.options.sitecoreVersion,
},
]);
this.options = { ...this.options, ...answers };
answers = await this.prompt([
{
type: 'list',
name: 'sitecoreUpdate',
message: msg.sitecoreUpdate.prompt,
choices: this.options.sitecoreVersion && this.options.sitecoreVersion,
when: !this.options.sitecoreUpdate,
},
]);
this.options = { ...this.options, ...answers };
this.options.codeGuidSeed = `${this.options.solutionName}.${this.options.moduleType}.${this.options.moduleName}`;
this.options.codeGuid = utils.guid(this.options.codeGuidSeed);
this.options.testGuidSeed = `${this.options.codeGuidSeed}.Tests`;
this.options.testGuid = utils.guid(this.options.testGuidSeed);
if (this.options.moduleType == 'Project') {
this.options.unicornSerializationDependenciesX = this.options.solutionName + '.Feature.*';
} else if (this.options.moduleType == 'Feature') {
this.options.unicornSerializationDependenciesX = this.options.solutionName + '.Foundation.*';
}
// setup name of code folder
if(this.options.supportHelix20 !== undefined) {
this.options.codeFolderName = this.options.supportHelix20 ? settings.websiteProjectFolder : settings.codeProjectFolder;
} else {
var isRequiredScVersion = this.options.sitecoreUpdate.majorVersion && Number(this.options.sitecoreUpdate.majorVersion) >= 9.3;
this.options.codeFolderName = !!isRequiredScVersion ? settings.websiteProjectFolder : settings.codeProjectFolder;
}
}