0f25607b by jrivera Committed by David LaPalomento

More fixes for tests and added a watch for automatic building

1 parent 4e23608e
1 'use strict'; 1 'use strict';
2 2
3 var basename = require('path').basename; 3 var
4 basename = require('path').basename,
5 mediaSourcesPath = 'node_modules/videojs-contrib-media-sources/dist/',
6 mediaSourcesDebug = mediaSourcesPath + 'videojs-media-sources.js';
4 7
5 module.exports = function(grunt) { 8 module.exports = function(grunt) {
6 var pkg = grunt.file.readJSON('package.json'); 9 var pkg = grunt.file.readJSON('package.json');
...@@ -24,16 +27,17 @@ module.exports = function(grunt) { ...@@ -24,16 +27,17 @@ module.exports = function(grunt) {
24 }, 27 },
25 dist: { 28 dist: {
26 nonull: true, 29 nonull: true,
27 src: ['node_modules/videojs-contrib-media-sources/dist/videojs-media-sources.js', 30 src: [
28 'src/videojs-hls.js', 31 mediaSourcesDebug,
29 'src/xhr.js', 32 'src/videojs-hls.js',
30 'src/stream.js', 33 'src/xhr.js',
31 'src/m3u8/m3u8-parser.js', 34 'src/stream.js',
32 'src/playlist.js', 35 'src/m3u8/m3u8-parser.js',
33 'src/playlist-loader.js', 36 'src/playlist.js',
34 'node_modules/pkcs7/dist/pkcs7.unpad.js', 37 'src/playlist-loader.js',
35 'src/decrypter.js' 38 'node_modules/pkcs7/dist/pkcs7.unpad.js',
36 ], 39 'src/decrypter.js'
40 ],
37 dest: 'dist/videojs.hls.js' 41 dest: 'dist/videojs.hls.js'
38 } 42 }
39 }, 43 },
...@@ -93,6 +97,10 @@ module.exports = function(grunt) { ...@@ -93,6 +97,10 @@ module.exports = function(grunt) {
93 } 97 }
94 }, 98 },
95 watch: { 99 watch: {
100 build: {
101 files: '<%= concat.dist.src %>',
102 tasks: ['clean', 'concat', 'uglify']
103 },
96 gruntfile: { 104 gruntfile: {
97 files: '<%= jshint.gruntfile.src %>', 105 files: '<%= jshint.gruntfile.src %>',
98 tasks: ['jshint:gruntfile'] 106 tasks: ['jshint:gruntfile']
......
This diff could not be displayed because it is too large.