-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
67 lines (63 loc) · 1.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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
hogan: {
binder: {
src: __dirname + '/templates/binder.hogan',
dest: __dirname + '/templates/binder.js',
options: {
binderName: 'bootstrap'
}
},
build: {
src: __dirname + '/templates/*.mustache',
dest: __dirname + '/assets/js/templates.js',
options: {
binderPath: __dirname + '/templates/binder.js'
}
}
},
uglify: {
options: {
report: 'min'
},
build: {
options: {
beautify: {
max_line_len: 500
}
},
files: {
'assets/js/scripts.min.js': [
'bower_components/zepto/zepto.js',
'bower_components/lodash/dist/lodash.js',
'bower_components/backbone/backbone.js',
'bower_components/hogan/web/builds/3.0.2/template-3.0.2.js',
'bower_components/twitter-text/js/twitter-text.js',
'bower_components/twemoji/twemoji.js',
'bower_components/moment/moment.js',
'assets/js/templates.js'
]
}
}
},
jshint: {
all: [
'assets/js/app.js'
]
},
connect: {
server: {
options: {
keepalive: true,
hostname: '*'
}
}
}
});
grunt.loadNpmTasks('grunt-hogan');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('build', ['hogan', 'uglify']);
};