-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntFile.js
57 lines (55 loc) · 1.91 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner:'/*!\n * Copyright (c) Christopher Keefer, <%= grunt.template.today("yyyy") %>.\n' +
' * https://github.com/SaneMethod/jalic \n' +
' * <%= pkg.name %>: V<%= pkg.version %>.\n' +
' * This file is generated by grunt - do not edit directly.\n' +
' * Alter source files as needed, then run `grunt` in project directory.\n' +
' * Compiled: <%= grunt.template.today("yyyy-mm-dd") %> \n */\n\n',
concat:{
options:{
stripBanners:{
block:true,
line:true
},
process:false,
separator:';' // Ensures an ending semi-colon after each file we concatenate
},
jalic:{
src:[
'jquery-ajax-binary-patch.js',
'indexeddb-setup.js',
'jquery-ajax-localstorage-indexeddb-cache.js'
],
dest:'build/jalic.cat.js'
}
},
uglify:{
options:{
banner:'<%= banner %>',
report:'min'
},
jalic:{
options:{
sourceMappingURL:'jalic.min.map',
sourceMapPrefix:2,
sourceMap:'dist/jalic.min.map'
},
src:'<%= concat.jalic.dest %>',
dest:'dist/jalic.min.js'
}
},
clean:{
js:{
src:['build/*']
}
}
});
// Load plugins for each task
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
// Tasks
grunt.registerTask('default', ['concat', 'uglify', 'clean']);
};