945eb6eb by Gary Katsevman

Use browserfiy-shim globally. (#710)

This is because media-sources requires video.js but doesn't require
browserify-shim itself, so, instead we need to make sure that we
browserify-shim all the dependencies.
1 parent 340137ee
......@@ -16,7 +16,7 @@
"build:js": "npm-run-all build:js:babel build:js:browserify build:js:bannerize build:js:uglify",
"build:js:babel": "babel src -d es5",
"build:js:bannerize": "bannerize dist/videojs-contrib-hls.js --banner=scripts/banner.ejs",
"build:js:browserify": "browserify . -s videojs-contrib-hls -t browserify-shim -o dist/videojs-contrib-hls.js",
"build:js:browserify": "browserify . -s videojs-contrib-hls -g browserify-shim -o dist/videojs-contrib-hls.js",
"build:js:uglify": "uglifyjs dist/videojs-contrib-hls.js --comments --mangle --compress -o dist/videojs-contrib-hls.min.js",
"build:test": "npm-run-all build:test:manifest build:test:js",
"build:test:js": "node scripts/build-test.js",
......@@ -42,7 +42,7 @@
"watch:docs": "nodemon --watch src/ --exec npm run docs",
"watch:js": "npm-run-all -p watch:js:babel watch:js:browserify",
"watch:js:babel": "npm run build:js:babel -- --watch",
"watch:js:browserify": "watchify . -v -t browserify-shim -o dist/videojs-contrib-hls.js",
"watch:js:browserify": "watchify . -v -g browserify-shim -o dist/videojs-contrib-hls.js",
"watch:test": "npm-run-all -p watch:test:*",
"watch:test:js": "node scripts/watch-test.js",
"watch:test:manifest": "node -e \"var b=require('./scripts/manifest-data.js'); b.watch();\"",
......
......@@ -5,7 +5,7 @@ var glob = require('glob');
glob('test/**/*.test.js', function(err, files) {
browserify(files)
.transform('babelify')
.transform('browserify-shim')
.transform('browserify-shim', {global: true})
.bundle()
.pipe(fs.createWriteStream('dist-test/videojs-contrib-hls.js'));
});
......
......@@ -10,7 +10,7 @@ glob('test/**/*.test.js', function(err, files) {
plugin: [watchify]
})
.transform('babelify')
.transform('browserify-shim');
.transform('browserify-shim', {global: true});
var bundle = function() {
b.bundle().pipe(fs.createWriteStream('dist-test/videojs-contrib-hls.js'));
......