diff --git a/generators/add/Templates/_project.unicorn.csproj b/generators/add/Templates/_project.unicorn.csproj
index aba184b..548149d 100644
--- a/generators/add/Templates/_project.unicorn.csproj
+++ b/generators/add/Templates/_project.unicorn.csproj
@@ -60,7 +60,7 @@
-
+
diff --git a/generators/add/index.js b/generators/add/index.js
index c08dc75..f9b2f06 100644
--- a/generators/add/index.js
+++ b/generators/add/index.js
@@ -105,6 +105,35 @@ module.exports = class extends yeoman {
});
}
+ askForFolderStructure() {
+ const done = this.async();
+ const questions = [{
+ type: 'list',
+ name: 'configConvention',
+ message: 'What folder structure do you want to be applied on config files?',
+ choices: [
+ {
+ name: 'App_Config/Include/Layer/ProjectName.ConfigName.config?',
+ value: true
+ }, {
+ name: 'App_Config/Include/Layer.ProjectName/ConfigName.config?',
+ value: false
+ },
+ ],
+ }];
+
+ this.prompt(questions).then((answers) => {
+ if(answers.configConvention){
+ this.configLayerName = this.layer;
+ this.configNamePrefix = this.settings.ProjectName + '.';
+ }else{
+ this.configLayerName = this.layer + '.' + this.settings.ProjectName;
+ this.configNamePrefix = '';
+ }
+ done();
+ });
+ }
+
askTargetFrameworkVersion() {
const done = this.async();
const questions = [{
@@ -130,6 +159,9 @@ module.exports = class extends yeoman {
this.templatedata.layer = this.layer;
this.templatedata.lowercasedlayer = this.layer.toLowerCase();
this.templatedata.target = this.target;
+ this.templatedata.configlayername = this.configLayerName;
+ this.templatedata.confignameprefix = this.configNamePrefix;
+
}
_copyProjectItems() {
@@ -204,8 +236,8 @@ module.exports = class extends yeoman {
const serializationDestinationFile = path.join(
this.settings.ProjectPath,
'App_Config/Include',
- this.settings.LayerPrefixedProjectName,
- 'serialization.config'
+ this.configLayerName,
+ this.configNamePrefix + 'Serialization.config'
);
this.fs.copyTpl(this.templatePath('_serialization.config'), this.destinationPath(serializationDestinationFile), this.templatedata);
}
diff --git a/package.json b/package.json
index 39e0d48..08f7e99 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "generator-helix",
- "version": "1.3.4",
+ "version": "1.3.5",
"description": "yeoman generator for Helix style Sitecore projects",
"main": "index.js",
"scripts": {
diff --git a/readme.md b/readme.md
index c1cd129..d35ce97 100644
--- a/readme.md
+++ b/readme.md
@@ -69,6 +69,8 @@ You can inject all the variables that the generator defines into your files usin
* `layer`
* `target`
* `vendorprefix`
+* `configlayername`
+* `confignameprefix`
***Note***