forked from kvakil/venus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
52 lines (52 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
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/kotlin/main/venus.js'],
'out/js/codemirror.js': ['src/main/frontend/js/codemirror.js'],
'out/js/kotlin.js' : ['src/main/frontend/js/kotlin.js'],
'out/js/risc-mode.js' : ['src/main/frontend/js/risc-mode.js']
}
}
},
cssmin: {
venus: {
files: {
'out/css/venus.css': ['src/main/frontend/css/*.css'],
//'out/css/bulma.css': ['src/main/frontend/css/bulma.css'],
//'out/css/codemirror.css': ['src/main/frontend/css/coremirror.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']);
};