Skip to content

Commit

Permalink
Revert 35ae3cc in favor of clarifying some of the wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Jan 25, 2018
1 parent 35ae3cc commit 69ead96
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions bin/sails-www.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,8 @@ module.exports = function() {

var log = CaptainsLog(rconf.log);

// Determine the destination path.
// > Grab the custom destination path from the CLI serial args, if one was provided.
// > (making sure to remove commander's extra argument)
var cliArguments = Array.prototype.slice.call(arguments);
cliArguments.pop();
var wwwPath = cliArguments[0] || 'www';

// Resolve the destination path, because it is probably a relative path.
wwwPath = path.resolve(process.cwd(), wwwPath);
// The destination path.
var wwwPath = path.resolve(process.cwd(), 'www');

// Determine the appropriate Grunt task to run based on `process.env.NODE_ENV`, `rconf.prod`, and `rconf.environment`.
var overrideGruntTask;
Expand All @@ -99,7 +92,7 @@ module.exports = function() {
else {
overrideGruntTask = 'build';
}
log.info('Compiling assets into standalone directory at `'+wwwPath+'` with `grunt ' + overrideGruntTask + '`...');
log.info('Compiling assets into standalone directory with `grunt ' + overrideGruntTask + '`...');

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Execute a command like you would on the terminal.
Expand All @@ -109,15 +102,15 @@ module.exports = function() {
if (err) {
log.error('Error occured running `grunt ' + overrideGruntTask + '`');
log.error('Please resolve any issues and try running `sails www` again.');
log.error('Hint: you must have the Grunt CLI installed! Try `npm install grunt`.');
log.error('Hint: you must have the Grunt CLI installed! Try `npm install grunt -g`.');
log.error();
log.error('Error details:');
log.error(err);
return process.exit(1);
}

log.info();
log.info('Created directory of compiled static assets at:');
log.info('Created directory of compiled assets at:');
log.info(wwwPath);
return process.exit(0);

Expand Down

0 comments on commit 69ead96

Please sign in to comment.