Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
grunt.registerTask('build', function () {
var done = this.async();
var when = require('when');
var request = require('request');
var _ = require('lodash');
var deps = require('matchdep').filterPeer('grunt-contrib-*');
var baseurl = 'http://raw.github.com/gruntjs/'
// make http request for author file in a repo
var authorFile = function (dep) {
var deferred = when.defer();
var url = baseurl+dep+'/master/AUTHORS';
request.get({url: url}, function(err, res, body) {
if (res.statusCode != 200) {
grunt.fail.fatal('Failed to retrieve '+url);
} else {
deferred.resolve(body.split('\n'));
}
});
return deferred.promise
};
module.exports = function(grunt) {
// Load all grunt-contrib peerDependencies.
require('matchdep').filterPeer('grunt-contrib-*').forEach(grunt.loadNpmTasks);
};