-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
53 lines (46 loc) · 1.45 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
var _ = require('lodash');
var processName = function(filename)
{
// Removes the path prefix + file ending (.handlebar)
return filename.split('/').pop().slice(0, -10);
};
var base = 'design/ezexceed/javascript/templates/';
var templateNames = ['alert', 'browser', 'item', 'nohits', 'scaler', 'scaledversion', 'scalerattributes', 'tag'];
var templates = {};
_.each(templateNames, function(name) {
templates[base + name + '.js'] = base + name + '.handlebar';
});
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: [
'grunt.js',
'design/standard/javascript/keymedia/*js',
'design/ezexceed/javascript/views/*js',
'design/ezexceed/javascript/(config|models|keymedia).js'
],
options: {
browser: true,
curly: false
}
},
handlebars: {
exceed: {
options: {
processName: processName,
wrapped: true,
namespace: false,
amd: true
},
files: templates
}
},
watch: {
files: ['**/*.handlebar'],
tasks: 'handlebars'
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.registerTask('default', ['jshint', 'handlebars']);
};