Skip to content

Commit

Permalink
fix(app): Fix issue with passing arguments to sub-generators
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Mar 20, 2017
1 parent 74fb0c4 commit c8e620e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions generators/app/steps/default.js
Expand Up @@ -8,7 +8,7 @@
module.exports = function () {
if (this.answers['authentication:enabled']) {
this.composeWith('sails-rest-api:authentication', {
args: [],
arguments: [],
options: {
'secret-key': this.answers['authentication:secret-key']
}
Expand All @@ -17,15 +17,15 @@ module.exports = function () {

if (this.answers['blueprint:all']) {
this.composeWith('sails-rest-api:blueprint', {
args: [],
arguments: [],
options: {
'all': true
}
});
}

this.composeWith('sails-rest-api:config', {
args: [],
arguments: [],
options: {
'database-adapter': this.answers['config:database-adapter'],
'database-host': this.answers['config:database-host'],
Expand All @@ -41,40 +41,40 @@ module.exports = function () {

this.answers['controller:chosen'].forEach(controller => {
this.composeWith('sails-rest-api:controller', {
args: [controller],
arguments: [controller],
options: {}
});
});

if (this.answers['cron:enabled']) {
this.composeWith('sails-rest-api:cron', {
args: [],
arguments: [],
options: {}
});
}

this.answers['hook:chosen'].forEach(hook => {
this.composeWith('sails-rest-api:hook', {
args: [hook],
arguments: [hook],
options: {}
});
});

this.composeWith('sails-rest-api:logger', {
args: [this.answers['logger:chosen']],
arguments: [this.answers['logger:chosen']],
options: {}
});

this.composeWith('sails-rest-api:response', {
args: [],
arguments: [],
options: {
'all': true
}
});

this.answers['service:chosen'].forEach(service => {
this.composeWith('sails-rest-api:service', {
args: [service],
arguments: [service],
options: {
'cipher-secret-key': this.answers['authentication:secret-key'],
'image-provider': this.answers['service:image-provider'],
Expand All @@ -89,7 +89,7 @@ module.exports = function () {

if (this.answers['swagger:enabled']) {
this.composeWith('sails-rest-api:swagger', {
args: [],
arguments: [],
options: {}
});
}
Expand Down

0 comments on commit c8e620e

Please sign in to comment.