-
Notifications
You must be signed in to change notification settings - Fork 10
/
Gruntfile.js
61 lines (58 loc) · 1.24 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
module.exports = function(grunt) {
grunt.initConfig({
uglify: {
options: {
report: 'gzip',
preserveComments: 'some',
compress: {
pure_getters: true
}
},
globals: {
options: {
banner: '(function(){',
footer: '\nwindow.Talker=Talker})()'
},
files: {
'dist/talker.min.js': [
'src/talker.js'
]
}
},
amd: {
options: {
banner: 'define([],function(){',
footer: '\nreturn Talker})'
},
files: {
'dist/amd/talker.min.js': [
'src/talker.js'
]
}
},
named_amd: {
options: {
banner: 'define("talker",[],function(){',
footer: '\nreturn Talker})'
},
files: {
'dist/named_amd/talker.min.js': [
'src/talker.js'
]
}
},
common_js: {
options: {
footer: '\nmodule.exports=Talker'
},
files: {
'dist/common_js/talker.min.js': [
'src/talker.js'
]
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['uglify']);
};