forked from madcowfred/evething
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
78 lines (75 loc) · 2.46 KB
/
Copy pathGruntfile.js
File metadata and controls
78 lines (75 loc) · 2.46 KB
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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
handlebars: {
hanldbears: {
options: {
namespace: 'Handlebars.templates',
processName: function (filePath) {
return filePath.replace(/^static\/handlebars\//, '').replace(/\.handlebars$/, '');
}
},
files: {
'static/js/templates.js': 'static/handlebars/*.handlebars'
}
}
},
concat: {
bootstrap: {
src: [
'static/js/bootstrap-alert.js',
'static/js/bootstrap-button.js',
'static/js/bootstrap-collapse.js',
'static/js/bootstrap-dropdown.js',
'static/js/bootstrap-modal.js',
'static/js/bootstrap-tooltip.js',
'static/js/bootstrap-popover.js',
'static/js/bootstrap-tab.js',
'static/js/bootstrap-scrollspy.js',
'static/js/bootstrap-affix.js',
'static/js/bootstrap-datepicker.js',
],
dest: 'static/js/bootstrap.js'
},
},
uglify: {
combined: {
options: {
sourceMap: true
},
src: [
'static/js/jquery.tablesorter.js',
'static/js/jquery.tablesorter.widgets.js',
'static/js/bootstrap.js',
'static/js/handlebars.runtime.js',
'static/js/templates.js',
'static/js/evething.js',
'static/js/evething/*.js'
],
dest: 'static/js/evething-combined.min.js'
}
},
less: {
options: {
cleancss: true
},
themes: {
files: {
'static/css/theme-cerulean.min.css': 'static/less/theme-cerulean/bootstrap.less',
'static/css/theme-cosmo.min.css': 'static/less/theme-cosmo/bootstrap.less',
'static/css/theme-cyborg.min.css': 'static/less/theme-cyborg/bootstrap.less',
'static/css/theme-darkthing.min.css': 'static/less/theme-darkthing/bootstrap.less',
'static/css/theme-default.min.css': 'static/less/theme-default/bootstrap.less',
'static/css/theme-slate.min.css': 'static/less/theme-slate/bootstrap.less'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
// Default task(s).
grunt.registerTask('default', ['handlebars', 'concat','uglify', 'less']);
};