-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
81 lines (73 loc) · 2.46 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'tasks/**/*.js'],
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true
}
},
clean: {
dist: {
options: {
force: true
},
src: [
'examples/publish/sprite1.png',
'examples/publish/sprite2.jpg',
'examples/publish/style.sprite.css',
'examples/publish/style.sprite.ie.css'
]
}
},
oversprite: {
publish: {
spritelist: [
{
'src': ['examples/blocks/b-images-1/*'],
'dest': 'examples/publish/sprite1.png',
'algorithm': 'alt-diagonal',
'padding': 10,
'exportOpts': {
'format': 'png',
'quality': 90
}
},
{
'src': ['examples/blocks/b-images-2/*'],
'dest': 'examples/publish/sprite2.jpg',
'exportOpts': {
'format': 'jpg',
'quality': 90
}
}
],
csslist: [
{
'src': 'examples/publish/style.css',
'dest': 'examples/publish/style.sprite.css'
},
{
'src': 'examples/publish/style.ie.css',
'dest': 'examples/publish/style.sprite.ie.css',
'base': '../blocks/'
}
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask("default", ["jshint", "clean", "oversprite"]);
grunt.loadTasks("tasks");
};