-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
78 lines (67 loc) · 2.6 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
module.exports = function (grunt) {
grunt.initConfig({
meta: {
version: '0.1.0'
},
concat: {
options: {
separator: '\n\n/*---------------------------------------*/\n\n',
banner: '/** melAnim - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'ColCh; Licensed GPLv3 ' +
'*/\n'
},
dist: {
dest:'dist/mel-anim.compiled.js',
src:[
'goog-base.js',
'src/start.js',
'src/begin.js',
'src/constants.js',
'src/utils.js',
'src/abstractions.js',
'src/hooks.js',
'src/aliases.js',
'src/defaults.js',
'src/animate_class.js',
'src/animate_wrap.js',
'src/animate_func.js',
'src/exports.js',
'src/end.js',
]
}
},
closureCompiler: {
options: {
src: 'dist/mel-anim.compiled.js',
//compilerFile: '../compiler-latest/compiler.jar',
compilerFile: '/usr/share/java/closure-compiler/closure-compiler.jar',
checkModified: false,
compilerOpts: {
formatting: 'PRETTY_PRINT',
language_in: 'ECMASCRIPT5_STRICT',
externs: ['externs.js'],
compilation_level: 'ADVANCED_OPTIMIZATIONS',
use_types_for_optimization: null,
summary_detail_level: 3,
//define: ["'ENABLE_DEBUG=false'"],
//create_source_map: 'melAnim.js.map',
warning_level: 'VERBOSE'//,
//third_party: null
//property_map_output_file: 'property-map.txt',
//variable_map_output_file: 'variable-map.txt'
//output_wrapper: "'(function(){%output%})();'"
}
},
advanced: {
src: 'dist/mel-anim.compiled.js',
dest: 'dist/mel-anim.adv.js'
}
}
});
grunt.loadNpmTasks('grunt-closure-tools');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('adv-min', ['closureCompiler:advanced']);
grunt.registerTask('default', ['concat']);
};