forked from jchristopher/searchwp-live-ajax-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
79 lines (71 loc) · 1.38 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
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
"bitwise": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es5": false,
"esnext": true,
"immed": true,
"jquery": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"strict": false,
"trailing": false,
"undef": true,
"globals": {
"jQuery": true,
"Spinner": true,
"searchwp_live_search_params": true,
"alert": true
}
},
all: [
'assets/javascript/source/searchwp-live-search.js'
]
},
uglify: {
dist: {
files: {
'assets/javascript/searchwp-live-search.min.js': [
'assets/javascript/source/searchwp-live-search-staged.js'
]
}
}
},
import: {
options: {},
dist: {
src: 'assets/javascript/source/wrapper.js',
dest: 'assets/javascript/source/searchwp-live-search-staged.js'
},
tasks: ['jshint','uglify']
},
watch: {
js: {
files: [
'<%= jshint.all %>'
],
tasks: ['import','jshint','uglify']
}
}
});
// Load tasks
grunt.loadNpmTasks('grunt-import');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register tasks
grunt.registerTask('default', [
'import',
'jshint',
'uglify',
'watch'
]);
};