83b4302b by David LaPalomento

Merge branch 'build-enhancement' into development

Closes #368
2 parents c924bc3a 2840eb36
dist/*
*~
*.iml
*.swp
......
'use strict';
var basename = require('path').basename;
var
basename = require('path').basename,
mediaSourcesPath = 'node_modules/videojs-contrib-media-sources/dist/',
mediaSourcesDebug = mediaSourcesPath + 'videojs-media-sources.js';
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
......@@ -24,17 +27,12 @@ module.exports = function(grunt) {
},
dist: {
nonull: true,
src: ['src/videojs-hls.js',
src: [
mediaSourcesDebug,
'src/videojs-hls.js',
'src/xhr.js',
'src/stream.js',
'src/flv-tag.js',
'src/exp-golomb.js',
'src/h264-extradata.js',
'src/h264-stream.js',
'src/aac-stream.js',
'src/metadata-stream.js',
'src/segment-parser.js',
'src/m3u8/m3u8-parser.js',
'src/xhr.js',
'src/playlist.js',
'src/playlist-loader.js',
'node_modules/pkcs7/dist/pkcs7.unpad.js',
......@@ -99,6 +97,10 @@ module.exports = function(grunt) {
}
},
watch: {
build: {
files: '<%= concat.dist.src %>',
tasks: ['clean', 'concat', 'uglify']
},
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
......@@ -334,13 +336,16 @@ module.exports = function(grunt) {
// Launch a Development Environment
grunt.registerTask('dev', 'Launching Dev Environment', 'concurrent:dev');
// Default task.
grunt.registerTask('default',
grunt.registerTask('build',
['clean',
'test',
'concat',
'uglify']);
// Default task.
grunt.registerTask('default',
['test',
'build']);
// The test task will run `karma:saucelabs` when running in travis,
// otherwise, it'll default to running karma in chrome.
// You can specify which browsers to build with by using grunt-style arguments
......