Skip to content

Commit

Permalink
fix(gen:heroku): allow for grunt or gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
Awk34 committed Apr 20, 2016
1 parent 78645db commit 954baa4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions heroku/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ Generator.prototype.copyProcfile = function copyProcfile() {
});
};

Generator.prototype.gruntBuild = function gruntBuild() {
Generator.prototype.build = function build() {
if(this.abort) return;
var done = this.async();
var buildCommand = this.filters.grunt ? 'grunt build' : 'gulp build';

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

this.log(chalk.yellow('After app modification run\n\t' + chalk.bold('grunt build') +
'\nThen deploy with\n\t' + chalk.bold('grunt buildcontrol:heroku')));
this.log(chalk.yellow(
'After app modification run\n\t' +
chalk.bold(this.filters.grunt ? 'grunt build' : 'gulp build') +
'\nThen deploy with\n\t' +
chalk.bold(this.filters.grunt ? 'grunt buildcontrol:heroku' : 'gulp buildcontrol:heroku')
));
}
done();
}.bind(this));
Expand Down

0 comments on commit 954baa4

Please sign in to comment.