forked from elabftw/elabftw
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
57 lines (53 loc) · 1.86 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
/**
* Gruntfile.js
*
* Run 'grunt' in shell to compile javascript and css files
*
*/
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n',
mangle: false
},
dist: {
files: {
'js/elabftw.min.js': ['js/common.js', 'js/cornify.js', 'js/jquery.rating.js', 'js/keymaster/keymaster.js', 'js/todolist.js', 'js/fancybox/source/jquery.fancybox.pack.js', 'js/colorpicker/jquery.colorpicker.js', 'js/jeditable/jquery.jeditable.js', 'js/jquery.complexify.js/jquery.complexify.js', 'js/jquery.complexify.js/jquery.complexify.banlist.js', 'js/3Dmol-nojquery.js', 'js/3dmol_helpers.js', 'js/dropzone/dist/min/dropzone.min.js'],
}
}
},
watch: {
files: ['<%= uglify.files %>'],
tasks: ['uglify']
},
cssmin: {
target: {
files: {
'css/main.min.css': ['css/tagcloud.css', 'css/jquery.rating.css', 'css/autocomplete.css', 'js/dropzone/dist/min/dropzone.min.css', 'css/main.css'],
'css/pdf.min.css': ['css/pdf.css']
}
}
},
shell: {
builddoc: {
command: 'cd doc; make html'
},
buildapi: {
command: 'phpdoc run -d app/classes -d app/models -d app/controllers -d app/views -t doc/api'
},
runtests: {
command: '~/.bin/selenium-server.sh; php vendor/bin/codecept --debug run'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('default', ['uglify', 'cssmin']);
grunt.registerTask('doc', 'shell:builddoc');
grunt.registerTask('api', 'shell:buildapi');
grunt.registerTask('test', 'shell:runtests');
};