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
5 tmp/** 4 tmp/**
6 test/**
...\ No newline at end of file ...\ No newline at end of file
5 test/**
......
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,22 +27,17 @@ module.exports = function(grunt) { ...@@ -24,22 +27,17 @@ module.exports = function(grunt) {
24 }, 27 },
25 dist: { 28 dist: {
26 nonull: true, 29 nonull: true,
27 src: ['src/videojs-hls.js', 30 src: [
28 'src/stream.js', 31 mediaSourcesDebug,
29 'src/flv-tag.js', 32 'src/videojs-hls.js',
30 'src/exp-golomb.js', 33 'src/xhr.js',
31 'src/h264-extradata.js', 34 'src/stream.js',
32 'src/h264-stream.js', 35 'src/m3u8/m3u8-parser.js',
33 'src/aac-stream.js', 36 'src/playlist.js',
34 'src/metadata-stream.js', 37 'src/playlist-loader.js',
35 'src/segment-parser.js', 38 'node_modules/pkcs7/dist/pkcs7.unpad.js',
36 'src/m3u8/m3u8-parser.js', 39 'src/decrypter.js'
37 'src/xhr.js', 40 ],
38 'src/playlist.js',
39 'src/playlist-loader.js',
40 'node_modules/pkcs7/dist/pkcs7.unpad.js',
41 'src/decrypter.js'
42 ],
43 dest: 'dist/videojs.hls.js' 41 dest: 'dist/videojs.hls.js'
44 } 42 }
45 }, 43 },
...@@ -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
......