forked from JustinWinthers/UserKinect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
92 lines (72 loc) · 2.25 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
82
83
84
85
86
87
88
89
90
91
92
module.exports = function(grunt) {
// load all grunt tasks dynamically
require('load-grunt-tasks')(grunt);
// measures the time each task takes
require('time-grunt')(grunt);
grunt.initConfig({
pkg: require('./package.json'),
// run JS hint on javascript files
jshint: {
jiraConnect: {
src: ['dist/jiraConnect.js']
}
},
// compress all files
imagemin: {
dynamic: {
files: [{
expand: true, // Enable dynamic expansion
cwd: 'www/', // Src matches are relative to this path
src: ['**.{png,jpg,gif}'], // Actual patterns to match
dest: 'www/images/' // Destination path prefix
}]
}
},
// uses http://caniuse.com to perform auto previxing
autoprefixer: {
options: {
browsers: ['last 4 versions', 'ie 8', 'ie 9', 'Opera 12.1', 'Safari 5.1']
},
dist: {
src: 'www/css/style.css',
dest: 'www/css/style-prefixed.css'
}
},
// run watch command on certain tasks
watch: {
mochaTests: {
files: ['tests/*'],
options: {
livereload: true
}
},
lintTheJS: {
files: ['dist/jiraConnect.js'],
tasks: ['jshint:jiraConnect'],
options: {
livereload: true
}
}
},
// monitor node server changes
nodemon: {
dev: {
script: 'server.js'
}
},
// run concurrent tasks
concurrent: {
dev: {
tasks:['watch', 'nodemon'],
options: {
logConcurrentOutput: true
}
},
build: ['jshint', 'imagemin', 'autoprefixer']
}
});
// Default task(s).
grunt.registerTask('build', ['concurrent:build']);
//tasks to run while developing
grunt.registerTask('dev', ['concurrent:dev']);
};