/**
 * Gruntfile
 *
 * This Node script is executed when you run `grunt` or `sails lift`.
 * It's purpose is to load the Grunt tasks in your project's `tasks`
 * folder, and allow you to add and remove tasks as you see fit.
 * For more information on how this works, check out the `README.md`
 * file that was generated in your `tasks` folder.
 *
 * WARNING:
 * Unless you know what you're doing, you shouldn't change this file.
 * Check out the `tasks` directory instead.
 */

module.exports = function(grunt) {


	/**
	 * Loads Grunt configuration modules from the specified
	 * relative path. These modules should export a function
	 * that, when run, should either load/configure or register
	 * a Grunt task.
	 */
	function loadTasks(relPath) {
		return includeAll({
			dirname: require('path').resolve(__dirname, relPath),
			filter: /(.+)\.js$/
		}) || {};
	}

	/**
	 * Invokes the function from a Grunt configuration module with
	 * a single argument - the `grunt` object.
	 */
	function invokeConfigFn(tasks) {
		for (var taskName in tasks) {
			if (tasks.hasOwnProperty(taskName)) {
				tasks[taskName](grunt);
			}
		}
	}


	// Load the include-all library in order to require all of our grunt
	// configurations and task registrations dynamically.
	var includeAll;
	try {
		includeAll = require('include-all');
	} catch (e0) {
		try {
			includeAll = require('sails/node-modules/include-all');
		}
		catch(e1) {
			console.error('Grunt:\nCould not find `include-all` module.');
			console.error('Skipping grunt tasks...');
			console.error('To fix this, please run:');
			console.error('npm install include-all --save`');
			console.error();

			grunt.registerTask('default', []);
			return;
		}
	}



	// Load task functions
	var taskConfigurations = loadTasks('./tasks/config'),
		registerDefinitions = loadTasks('./tasks/register');

	// (ensure that a default task exists)
	if (!registerDefinitions.default) {
		registerDefinitions.default = function (grunt) { grunt.registerTask('default', []); };
	}

	// Run task functions to configure Grunt.
	invokeConfigFn(taskConfigurations);
	invokeConfigFn(registerDefinitions);

};

@@ -508,16 +508,586 @@
 nt) %7B%0A%0A%0A
+%09// Load the include-all library in order to require all of our grunt%0A%09// configurations and task registrations dynamically.%0A%09var includeAll;%0A%09try %7B%0A%09%09includeAll = require('include-all');%0A%09%7D catch (e0) %7B%0A%09%09try %7B%0A%09%09%09includeAll = require('sails/node_modules/include-all');%0A%09%09%7D%0A%09%09catch(e1) %7B%0A%09%09%09console.error('Could not find %60include-all%60 module.');%0A%09%09%09console.error('Skipping grunt tasks...');%0A%09%09%09console.error('To fix this, please run:');%0A%09%09%09console.error('npm install include-all --save%60');%0A%09%09%09console.error();%0A%0A%09%09%09grunt.registerTask('default', %5B%5D);%0A%09%09%09return;%0A%09%09%7D%0A%09%7D%0A%0A%0A
 %09/**%0A%09 *
@@ -1702,585 +1702,8 @@
 %7D%0A%0A%0A
-%09// Load the include-all library in order to require all of our grunt%0A%09// configurations and task registrations dynamically.%0A%09var includeAll;%0A%09try %7B%0A%09%09includeAll = require('include-all');%0A%09%7D catch (e0) %7B%0A%09%09try %7B%0A%09%09%09includeAll = require('sails/node-modules/include-all');%0A%09%09%7D%0A%09%09catch(e1) %7B%0A%09%09%09console.error('Grunt:%5CnCould not find %60include-all%60 module.');%0A%09%09%09console.error('Skipping grunt tasks...');%0A%09%09%09console.error('To fix this, please run:');%0A%09%09%09console.error('npm install include-all --save%60');%0A%09%09%09console.error();%0A%0A%09%09%09grunt.registerTask('default', %5B%5D);%0A%09%09%09return;%0A%09%09%7D%0A%09%7D%0A%0A
 %0A%0A%09/

Fix require path.