83b4302b by David LaPalomento

Merge branch 'build-enhancement' into development

Closes #368
2 parents c924bc3a 2840eb36
1 dist/*
2 *~ 1 *~
3 *.iml 2 *.iml
4 *.swp 3 *.swp
......
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,17 +27,12 @@ module.exports = function(grunt) { ...@@ -24,17 +27,12 @@ module.exports = function(grunt) {
24 }, 27 },
25 dist: { 28 dist: {
26 nonull: true, 29 nonull: true,
27 src: ['src/videojs-hls.js', 30 src: [
31 mediaSourcesDebug,
32 'src/videojs-hls.js',
33 'src/xhr.js',
28 'src/stream.js', 34 'src/stream.js',
29 'src/flv-tag.js',
30 'src/exp-golomb.js',
31 'src/h264-extradata.js',
32 'src/h264-stream.js',
33 'src/aac-stream.js',
34 'src/metadata-stream.js',
35 'src/segment-parser.js',
36 'src/m3u8/m3u8-parser.js', 35 'src/m3u8/m3u8-parser.js',
37 'src/xhr.js',
38 'src/playlist.js', 36 'src/playlist.js',
39 'src/playlist-loader.js', 37 'src/playlist-loader.js',
40 'node_modules/pkcs7/dist/pkcs7.unpad.js', 38 'node_modules/pkcs7/dist/pkcs7.unpad.js',
...@@ -99,6 +97,10 @@ module.exports = function(grunt) { ...@@ -99,6 +97,10 @@ module.exports = function(grunt) {
99 } 97 }
100 }, 98 },
101 watch: { 99 watch: {
100 build: {
101 files: '<%= concat.dist.src %>',
102 tasks: ['clean', 'concat', 'uglify']
103 },
102 gruntfile: { 104 gruntfile: {
103 files: '<%= jshint.gruntfile.src %>', 105 files: '<%= jshint.gruntfile.src %>',
104 tasks: ['jshint:gruntfile'] 106 tasks: ['jshint:gruntfile']
...@@ -334,13 +336,16 @@ module.exports = function(grunt) { ...@@ -334,13 +336,16 @@ module.exports = function(grunt) {
334 // Launch a Development Environment 336 // Launch a Development Environment
335 grunt.registerTask('dev', 'Launching Dev Environment', 'concurrent:dev'); 337 grunt.registerTask('dev', 'Launching Dev Environment', 'concurrent:dev');
336 338
337 // Default task. 339 grunt.registerTask('build',
338 grunt.registerTask('default',
339 ['clean', 340 ['clean',
340 'test',
341 'concat', 341 'concat',
342 'uglify']); 342 'uglify']);
343 343
344 // Default task.
345 grunt.registerTask('default',
346 ['test',
347 'build']);
348
344 // The test task will run `karma:saucelabs` when running in travis, 349 // The test task will run `karma:saucelabs` when running in travis,
345 // otherwise, it'll default to running karma in chrome. 350 // otherwise, it'll default to running karma in chrome.
346 // You can specify which browsers to build with by using grunt-style arguments 351 // You can specify which browsers to build with by using grunt-style arguments
......