-
Notifications
You must be signed in to change notification settings - Fork 8
/
Gruntfile.js
36 lines (33 loc) · 1.03 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module.exports = function( grunt ) {
var jf = require( 'jsonfile' );
grunt.initConfig({
jshint: {
tasks: [
'tasks/*.js'
]
},
jimp: {
ingame : {
options : {
actions : {
resize: [ 64, 64 ]
}
},
files : [{
expand: true,
cwd: 'teams/',
src: [ '**/*.png' ],
dest: 'web/resources/ingame/',
rename: function( dest, src ){
var data = jf.readFileSync( 'teams/' + src.split( '/' )[ 0 ] + '/data.json' );
return dest + data.steam.name + '.png';
}
}]
}
}
});
grunt.loadNpmTasks( 'grunt-newer' );
grunt.loadNpmTasks( 'grunt-jimp' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.registerTask( 'default', [ 'newer:jimp:ingame' ] );
};