Skip to content

Commit 954baa4

Browse files
committed
fix(gen:heroku): allow for grunt or gulp
1 parent 78645db commit 954baa4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Diff for: heroku/index.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ Generator.prototype.copyProcfile = function copyProcfile() {
112112
});
113113
};
114114

115-
Generator.prototype.gruntBuild = function gruntBuild() {
115+
Generator.prototype.build = function build() {
116116
if(this.abort) return;
117117
var done = this.async();
118+
var buildCommand = this.filters.grunt ? 'grunt build' : 'gulp build';
118119

119120
this.log(chalk.bold('\nBuilding dist folder, please wait...'));
120-
var child = exec('grunt build', function (err, stdout) {
121+
var child = exec(buildCommand, function (err, stdout) {
121122
done();
122123
}.bind(this));
123124
child.stdout.on('data', function(data) {
@@ -187,8 +188,12 @@ Generator.prototype.gitForcePush = function gitForcePush() {
187188
this.log(chalk.green('\nYou may need to address the issues mentioned above and restart the server for the app to work correctly.'));
188189
}
189190

190-
this.log(chalk.yellow('After app modification run\n\t' + chalk.bold('grunt build') +
191-
'\nThen deploy with\n\t' + chalk.bold('grunt buildcontrol:heroku')));
191+
this.log(chalk.yellow(
192+
'After app modification run\n\t' +
193+
chalk.bold(this.filters.grunt ? 'grunt build' : 'gulp build') +
194+
'\nThen deploy with\n\t' +
195+
chalk.bold(this.filters.grunt ? 'grunt buildcontrol:heroku' : 'gulp buildcontrol:heroku')
196+
));
192197
}
193198
done();
194199
}.bind(this));

0 commit comments

Comments
 (0)