-
Notifications
You must be signed in to change notification settings - Fork 53
/
Gruntfile.js
48 lines (48 loc) · 1.57 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
module.exports = function(grunt) {
grunt.initConfig({
qunit: {
src: ['qunit/test.html'],
force: true
},
uglify: {
options: {
banner: '/*! venus <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
venus: {
files: {
'out/venus.js': ['build/classes/main/min/*.js'],
'out/js/codemirror.js': ['src/main/frontend/js/*.js']
}
}
},
cssmin: {
venus: {
files: {
'out/css/venus.css': ['src/main/frontend/css/*.css']
}
}
},
htmlmin: {
venus: {
options: {
removeComments: true,
collapseWhitespace: true,
removeEmptyAttributes: true,
removeCommentsFromCDATA: true,
removeRedundantAttributes: true,
collapseBooleanAttributes: true
},
files: {
'out/index.html': ['src/main/frontend/index.html']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.registerTask('test', 'qunit:src');
grunt.registerTask('dist', ['uglify:venus', 'cssmin', 'htmlmin']);
grunt.registerTask('frontend', ['cssmin:venus', 'htmlmin:venus']);
};