This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.registerTask('finalize', function () { | |
var cdnBaseUrl = "//mycdn/scripts/"; // CDN Url where files will be hosted | |
var pathBase = "./dist/scripts/"; // Local directory where files are already optimized with rjs and already revved (like d4edefds.file.js) | |
function revmd5(fileContent) { | |
var hash = crypto.createHash("md5"); | |
hash.update(fileContent); | |
// 8 chars will be sufficient | |
return hash.digest('hex').slice(0, 8); | |
} |