1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-27 11:22:06 +02:00

fix: remove 'use strict' from rollup because vttjs isn't strict (#4551)

This commit is contained in:
Gary Katsevman 2017-08-14 16:51:05 -04:00 committed by GitHub
parent 6233d14091
commit db55bbd3ec

View File

@ -71,6 +71,7 @@ const es = {
legacy: true legacy: true
}, },
banner: compiledLicense(Object.assign({includesVtt: true}, bannerData)), banner: compiledLicense(Object.assign({includesVtt: true}, bannerData)),
useStrict: false,
format: 'es', format: 'es',
dest: 'dist/video.es.js' dest: 'dist/video.es.js'
}; };
@ -94,6 +95,7 @@ const umd = {
legacy: true legacy: true
}, },
banner: compiledLicense(Object.assign({includesVtt: true}, bannerData)), banner: compiledLicense(Object.assign({includesVtt: true}, bannerData)),
useStrict: false,
format: 'umd', format: 'umd',
dest: 'dist/video.js' dest: 'dist/video.js'
}; };
@ -134,10 +136,11 @@ const minifiedNovttUmd = Object.assign({}, _.cloneDeep(minifiedUmd), {
minifiedNovttUmd.options.plugins.unshift(ignore(['videojs-vtt.js'])); minifiedNovttUmd.options.plugins.unshift(ignore(['videojs-vtt.js']));
function runRollup({options, format, dest, banner}) { function runRollup({options, useStrict, format, dest, banner}) {
rollup(options) rollup(options)
.then(function(bundle) { .then(function(bundle) {
bundle.write({ bundle.write({
useStrict,
format, format,
dest, dest,
banner, banner,
@ -161,7 +164,7 @@ if (!args.watch) {
runRollup(novttUmd); runRollup(novttUmd);
} }
} else { } else {
const props = ['format', 'dest', 'banner']; const props = ['format', 'dest', 'banner', 'useStrict'];
const watchers = [ const watchers = [
['es', watch({rollup}, ['es', watch({rollup},
Object.assign({}, Object.assign({},