gulp-grunt
gulp-grunt copied to clipboard
Specify dependencies for grunt tasks
I have a use case where-by when parsing the grunt file and creating gulp tasks, I need to be able to specify a dependency for the for the gulp task that gets created. For example, given the following gulp task:
gulp.task('create-some-files', function() {
var stream = //create some files in a specific location
return stream;
});
I have a gruntfile somewhere that uses the files that are created in the gulp task:
grunt.initConfig({
useSomeFiles: {
src: '/path/to/files/created/in/gulp/task'
}
});
It would be ideal if when loading gulp-grunt, I could specify a dependency for the grunt task. Maybe something like:
require('gulp-grunt')(gulp, {
deps: {
useSomeFiles: 'create-some-files'
}
});
which would result in a gulp task being created with the signature:
gulp.task('grunt-useSomeFiles',['create-some-files'], fn);
I realize there are lots of questions to answer before a workable solution could be implemented. For example, the grunt tasks can have multiple targets, how would you specify dependencies per target, etc.
If it could be figured out, it would be a nice feature to have.