Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @fileOverview The vendors part of the build operation.
*/
var fs = require('fs');
var grunt = require('grunt');
var __ = require('lodash');
var gUglify = require('grunt-contrib-uglify')().uglify.init( grunt );
var helpers= require('./helpers');
var vendorLibs = module.exports = {};
/**
* Bundles the vendor libraries into one file and minifies them.
*
* Currently using uglify.
*
* For unknown reasons certain patterns of libs make
* closure compiler to blow up (litteraly)
*
* @param {Object} buildOpts The build options.
* @param {Object} options The options object.
* @return {boolean} success or not.
exports.init = function(grunt) {
var uglify = require('grunt-contrib-uglify/tasks/lib/uglify').init(grunt);
var cssModule = require('./css');
var crypto = require('crypto');
var path = require('path');
var csso = require('csso');
var fs = require('fs');
var _ = require('underscore');
var exports = {};
var catalogFile = '.build-catalog.json';
var reSkipCSSFileName = /^_/;
function md5(str) {
return crypto.createHash('md5').update(str).digest("hex");
}