linnovate/mean — pull request #939 by rmisiak (2014-12-05 03:18:42+00:00)
Title: ability to add grunt tasks to packages

This PR adds the ability to add grunt tasks to packages, and for packages to be able to default 'default' tasks. It's a result of the discussion in https://github.com/linnovate/mean/pull/938

To add a task in a package, just create a 'tasks' directory in the package root and create a js file in it.

The task can then opt in to be run by default like so:

module.exports = function(grunt) {
grunt.config('package-default', {
options: {
tasks: {
'my-default-task': true
}
}
});

grunt.registerTask('my-default-task', '...', function() {
// do something
});
};

I have a proof of concept including a default package task (sass compiler) at https://github.com/rmisiak/mean/tree/package-grunt-poc