@@ -6,18 +6,43 @@ module.exports = function(grunt) {
6
6
options : {
7
7
separator : ';'
8
8
} ,
9
- dist : {
10
- src : [ 'src/**/*.js' ] ,
11
- dest : 'dist/<%= pkg.name %>.js'
9
+ all : {
10
+ src : [ 'src/log.js' , // logging system
11
+ 'src/DataStream.js' , // bit/byte/string read-write operations
12
+ 'src/descriptor.js' , // MPEG-4 descriptor parsing
13
+ 'src/box.js' , // base code for box parsing/writing
14
+ 'src/box-parse.js' , // box parsing code
15
+ 'src/box-write.js' , // box writing code
16
+ 'src/box-unpack.js' , // box code for sample manipulation
17
+ 'src/mp4-text.js' , // text-based track manipulations
18
+ 'src/isofile.js' , // file level operations (read, write)
19
+ 'src/mp4box.js' // application level operations (data append, sample extraction, segmentation, ...)
20
+ ] ,
21
+ dest : 'dist/<%= pkg.name %>.all.js'
22
+ } ,
23
+ simple : {
24
+ src : [ 'src/log.js' , // logging system
25
+ 'src/DataStream.js' , // bit/byte/string read-write operations
26
+ 'src/box.js' , // base code for box parsing/writing
27
+ 'src/box-parse.js' , // box parsing code
28
+ 'src/isofile.js' , // file level operations (read, write)
29
+ 'src/mp4box.js' // application level operations (data append, sample extraction, segmentation, ...)
30
+ ] ,
31
+ dest : 'dist/<%= pkg.name %>.simple.js'
12
32
}
13
33
} ,
14
34
uglify : {
15
35
options : {
16
36
banner : '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
17
37
} ,
18
- dist : {
38
+ all : {
19
39
files : {
20
- 'dist/<%= pkg.name %>.min.js' : [ '<%= concat.dist.dest %>' ]
40
+ 'dist/<%= pkg.name %>.all.min.js' : [ '<%= concat.all.dest %>' ]
41
+ }
42
+ } ,
43
+ simple : {
44
+ files : {
45
+ 'dist/<%= pkg.name %>.simple.min.js' : [ '<%= concat.simple.dest %>' ]
21
46
}
22
47
}
23
48
} ,
@@ -39,7 +64,7 @@ module.exports = function(grunt) {
39
64
}
40
65
} ,
41
66
jshint : {
42
- files : [ 'Gruntfile.js' , 'src/**/*.js' , 'test/**/*.js' , '!test/lib/**/*.js' ] ,
67
+ files : [ 'Gruntfile.js' , 'src/**/*.js' , 'test/**/*.js' , '!test/lib/**/*.js' , '!test/mp4/**/*.js' ] ,
43
68
options : {
44
69
// options here to override JSHint defaults
45
70
eqeqeq : false ,
@@ -65,6 +90,9 @@ module.exports = function(grunt) {
65
90
66
91
grunt . registerTask ( 'test' , [ 'jshint' , 'connect' , 'qunit' ] ) ;
67
92
68
- grunt . registerTask ( 'default' , [ 'jshint' , 'concat' , 'uglify' ] ) ;
93
+ grunt . registerTask ( 'all' , [ 'concat:all' , 'uglify:all' ] ) ;
94
+ grunt . registerTask ( 'simple' , [ 'concat:simple' , 'uglify:simple' ] ) ;
95
+
96
+ grunt . registerTask ( 'default' , [ 'jshint' , 'all' , 'simple' ] ) ;
69
97
70
98
} ;
0 commit comments