forked from versatica/JsSIP
-
Notifications
You must be signed in to change notification settings - Fork 2
/
grunt.js
90 lines (88 loc) · 2.22 KB
/
grunt.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
79
80
81
82
83
84
85
86
87
88
89
90
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: "/*! jsSIP v@<%= pkg.version %> jssip.net | jssip.net/license */"
},
lint: {
dist: "dist/<%= pkg.name %>-<%= pkg.version %>.js",
grunt: "grunt.js"
},
concat: {
dist: {
src: [
"src/head.js",
"src/EventEmitter.js",
"src/constants.js",
"src/exceptions.js",
"src/timers.js",
"src/Transport.js",
"src/Parser.js",
"src/SIPMessage.js",
"src/Transactions.js",
"src/Dialogs.js",
"src/RequestSender.js",
"src/InDialogRequestSender.js",
"src/Registrator.js",
"src/Session.js",
"src/MediaSession.js",
"src/Message.js",
"src/UA.js",
"src/utils.js",
"src/SanityCheck.js",
"src/DigestAuthentication.js",
"src/tail.js"
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
},
post: {
src: [
'dist/<%= pkg.name %>-<%= pkg.version %>.js',
"src/grammar/dist/grammar.js"
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
},
post_min: {
src: [
'dist/<%= pkg.name %>-<%= pkg.version %>.min.js',
"src/grammar/dist/grammar.min.js"
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
}
},
watch: {
files: '<config:lint.files>',
tasks: 'lint test'
},
jshint: {
options: {
browser: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: false,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
onecase:true,
unused:true,
supernew: true
},
globals: {}
},
uglify: {}
});
// Default task.
grunt.registerTask('default', 'concat:dist lint min concat:post concat:post_min' );
};