Skip to content

Commit

Permalink
Rip out grunt hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Nov 4, 2016
1 parent ff91d3a commit 48750d7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 527 deletions.
3 changes: 1 addition & 2 deletions bin/sails-www.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
var nodepath = require('path');
var _ = require('@sailshq/lodash');
var CaptainsLog = require('captains-log');
var GruntHookDef = require('sails-hook-grunt');
var Sails = require('../lib/app');
var rconf = require('../lib/app/configuration/rc');
var GruntHookDef = require('../lib/hooks/grunt');
var Err = require('../errors');


Expand All @@ -19,7 +19,6 @@ var Err = require('../errors');
* Run the `build` or `buildProd` Grunt task (depending on whether this is the production environment)
* for the Sails app in the current working directory.
*
* @stability 2
* @see http://sailsjs.org/documentation/reference/command-line-interface/sails-www
*/

Expand Down
40 changes: 0 additions & 40 deletions errors/fatal.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,46 +73,6 @@ module.exports = {
},



// This doesn't technically _need_ to be a fatal error- it just is
// because certain grunt modules (e.g. grunt-contrib-watch) don't restart
// when an error occurs.
__GruntAborted__: function(consoleMsg, stackTrace) {

var gruntErr =
'\n------------------------------------------------------------------------\n' +
consoleMsg + '\n' + (stackTrace || '') +
'\n------------------------------------------------------------------------';
log.error(gruntErr);
log.blank();

log.error('Looks like a Grunt error occurred--');
log.error('Please fix it, then **restart Sails** to continue running tasks (e.g. watching for changes in assets)');
log.error('Or if you\'re stuck, check out the troubleshooting tips below.');
log.blank();

log.error(chalk.underline('Troubleshooting tips:'));
var relativePublicPath = (nodepath.resolve(process.cwd(), './.tmp'));
var uid = process.getuid && process.getuid() || 'YOUR_COMPUTER_USER_NAME';
log.error();
log.error(' *-> Are "grunt" and related grunt task modules installed locally? Run `npm install` if you\'re not sure.');
log.error();
log.error(' *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.');
log.error();
log.error(' *-> Or maybe you don\'t have permissions to access the `.tmp` directory?');
log.error(' e.g., `' + relativePublicPath + '`', '?');
log.error();
log.error(' If you think this might be the case, try running:');
log.error(' sudo chown -R', uid, relativePublicPath);
log.blank();

// See note above this function - for now, this will not
// actually terminate the process. The rest of Sails should
// continue to run.
// return _terminateProcess(1);
},


__UnknownPolicy__: function(policy, source, pathToPolicies) {
source = source || 'config.policies';

Expand Down
2 changes: 1 addition & 1 deletion lib/app/configuration/default-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
'i18n': true,
'userconfig': true,//<< TODO: absorb into core (i.e. like what we did w/ the controllers hook -- can live in `lib/app/configuration`)
'session': true,
'grunt': true,//<< TODO: extrapolate (see https://github.com/boogerlad/sails-hook-grunt/issues/1 and https://github.com/mikermcneil/sails-hook-grunt)
'grunt': 'sails-hook-grunt',
'http': true,
'userhooks': true//<< TODO: absorb into core (i.e. like what we did w/ the controllers hook -- its logic can live in `lib/app/private`, and be driven by `lib/hooks/index.js`)
};
110 changes: 0 additions & 110 deletions lib/hooks/grunt/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions lib/hooks/grunt/grunt-wrapper.js

This file was deleted.

Loading

0 comments on commit 48750d7

Please sign in to comment.