-
Notifications
You must be signed in to change notification settings - Fork 1
/
grunt.js
82 lines (70 loc) · 1.49 KB
/
grunt.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
/*global module:false*/
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-less');
// Project configuration.
grunt.initConfig({
meta: {
version: '0.1.0',
banner: '/*! CODECOLLISION - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://www.codecollision.net/\n' +
'* <%= grunt.template.today("yyyy") %> - ' +
'Michael Martin */'
},
// source files
src: {
js: [
// libraries
'lib/structure.min.js',
'lib/underscore.min.js',
'lib/jquery.history.min.js',
'lib/jquery.backstretch.min.js',
'lib/jquery.foundation.orbit.js',
'lib/jquery.imagesloaded.min.js',
// codecollision source (order matters)
'js/codecollision.js',
'js/util/history.js',
'js/util/utilities.js',
'js/util/prefetch.js',
'js/posts/post_model.js',
'js/posts/post_view.js',
'js/init.js'
],
less: [
'less/*.less'
]
},
// concat
concat: {
dist: {
src: ['<config:src.js>'],
dest: 'dist/scripts.js'
}
},
// minify
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/scripts.min.js'
}
},
// less
less: {
all: {
src: 'less/codecollision.less',
dest: 'css/codecollision.css',
options: {
compress: true
}
}
},
// watch
watch: {
files: ['<config:src.js>', '<config:src.less>'],
tasks: 'concat min less'
},
uglify: {}
});
// Default task.
grunt.registerTask('default', 'less');
};