-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathgruntfile.js
executable file
·91 lines (83 loc) · 3.03 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
htmllint: {
all: {
options: {
},
src: ['index.html']
}
},
uglify: {
build: {
files: {
'build/js/script.min.js': ['assets/js/lib/bootstrap.min2.js', 'assets/js/lib/typeahead.js', 'assets/js/lib/mustache.js', 'assets/js/navMap.js', 'assets/js/navigator.js', 'assets/js/timescale.js', 'assets/js/reconstruct.js', 'assets/js/taxaBrowser.js', 'assets/js/diversity.js']
}
}
},
cssmin: {
combine: {
files: {
'build/css/navigator.min.css': ['assets/css/lib/bootstrapRC2.min.css', 'assets/css/lib/typeahead.css', 'assets/css/timescale.css', 'assets/css/taxaBrowser.css', 'assets/css/navigator.css']
}
}
},
shell: {
plates: {
command: 'node build_plate_cache.js',
options: {
stdout: true,
execOptions: {
cwd: 'assets/js/utilities'
}
}
},
badPlates: {
command: 'node fix_bad_plates.js',
options: {
stdout: true,
execOptions: {
cwd: 'assets/js/utilities'
}
}
},
rotations: {
command: 'node build_rotation_cache.js',
options: {
stdout: true,
execOptions: {
cwd: 'assets/js/utilities'
}
}
},
oldCollections: {
command: 'node get_old_collections.js',
options: {
stdout: true,
execOptions: {
cwd: 'assets/js/utilities'
}
}
}
},
watch: {
html: {
files: ['index.html'],
tasks: ['htmlhint']
},
js: {
files: ['assets/js/lib/bootstrap.min.js', 'assets/js/lib/typeahead.js', 'assets/js/lib/mustache.js', 'assets/js/navMap.js', 'assets/js/navigator.js', 'assets/js/timescale.js', 'assets/js/reconstruct.js', 'assets/js/taxaBrowser.js', 'assets/js/diversity.js'],
tasks: ['uglify']
},
css: {
files: ['assets/css/lib/bootstrapRC2.min.css', 'assets/css/lib/typeahead.css', 'assets/css/timescale.css', 'assets/css/taxaBrowser.css', 'assets/css/navigator.css'],
tasks: ['cssmin']
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-html');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['uglify', 'cssmin']);
};