xing-frontend-grunt
Version:
The toolset for building Xing frontend applications
33 lines (32 loc) • 804 B
JavaScript
module.exports = function(grunt) {
return {
options: {
hashLength: 8,
noProcess: true,
onComplete: function(map, files) {
var cacheMap = [];
var dirRE = new RegExp( '^('+grunt.config('build_dirs.root')+'|'+grunt.config('compile_dir')+')\/', 'g' );
files.forEach(function(file) {
return cacheMap.push({
pattern: file.replace( dirRE, '' ),
replacement: map[file].replace( dirRE, '' )
});
});
grunt.config('fingerprintCache', cacheMap);
}
},
dist: {
files: [
{
expand: true,
cwd: './',
dest: './',
src: [
'<%= compile_targets.js %>',
'<%= compile_targets.css %>'
]
}
]
}
};
};