diff --git a/package-lock.json b/package-lock.json index ec309474..ecb20661 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,6 @@ "samsam": "1.3.0" } }, - "@types/estree": { - "version": "0.0.38", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.38.tgz", - "integrity": "sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA==", - "dev": true - }, "@types/node": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.1.2.tgz", @@ -8222,13 +8216,21 @@ } }, "rollup": { - "version": "0.58.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.58.2.tgz", - "integrity": "sha512-RZVvCWm9BHOYloaE6LLiE/ibpjv1CmI8F8k0B0Cp+q1eezo3cswszJH1DN0djgzSlo0hjuuCmyeI+1XOYLl4wg==", + "version": "0.59.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.59.3.tgz", + "integrity": "sha512-A94GFMZlwwtS3t5p6jSTp9w4Asxu5C16NcEoQPUFPfl76FOHFA4bXjOdnirzBysdZqSS/2Dibhz1bdWZ/0UqQQ==", "dev": true, "requires": { - "@types/estree": "0.0.38", + "@types/estree": "0.0.39", "@types/node": "10.1.2" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + } } }, "rollup-plugin-babel": { diff --git a/package.json b/package.json index 0f7d4d70..4d353fec 100644 --- a/package.json +++ b/package.json @@ -121,10 +121,10 @@ "npm-run-all": "^4.0.2", "qunit": "^2.5.1", "rimraf": "^2.6.1", - "rollup": "^0.58.2", + "rollup": "^0.59.3", "rollup-plugin-babel": "^3.0.4", "rollup-plugin-commonjs": "^9.1.3", - "rollup-plugin-json": "^2.1.1", + "rollup-plugin-json": "^3.0.0", "rollup-plugin-multi-entry": "^2.0.1", "rollup-plugin-node-resolve": "^3.0.0", "rollup-plugin-re": "^1.0.6", diff --git a/scripts/modules.rollup.config.js b/scripts/modules.rollup.config.js index 606d8378..26450db0 100644 --- a/scripts/modules.rollup.config.js +++ b/scripts/modules.rollup.config.js @@ -11,13 +11,21 @@ import replace from './rollup-replace'; import commonjs from 'rollup-plugin-commonjs'; import resolve from 'rollup-plugin-node-resolve'; +const name = 'videojsVr'; +const globals = { + 'video.js': 'videojs' +}; + export default { - name: 'videojsVr', input: 'src/plugin.js', output: [{ + name, + globals, file: 'dist/videojs-vr.cjs.js', format: 'cjs' }, { + name, + globals, file: 'dist/videojs-vr.es.js', format: 'es' }], @@ -29,9 +37,6 @@ export default { 'three', 'webvr-boilerplate' ], - globals: { - 'video.js': 'videojs' - }, legacy: true, plugins: [ resolve({ diff --git a/scripts/test.rollup.config.js b/scripts/test.rollup.config.js index 5a2ca792..40051347 100644 --- a/scripts/test.rollup.config.js +++ b/scripts/test.rollup.config.js @@ -10,10 +10,19 @@ import multiEntry from 'rollup-plugin-multi-entry'; import resolve from 'rollup-plugin-node-resolve'; import replace from './rollup-replace'; +const name = 'videojsVrTests'; +const globals = { + 'qunit': 'QUnit', + 'qunitjs': 'QUnit', + 'sinon': 'sinon', + 'video.js': 'videojs' +}; + export default { - name: 'videojsVrTests', input: 'test/**/*.test.js', output: { + name, + globals, file: 'test/dist/bundle.js', format: 'iife' }, @@ -23,12 +32,6 @@ export default { 'sinon', 'video.js' ], - globals: { - 'qunit': 'QUnit', - 'qunitjs': 'QUnit', - 'sinon': 'sinon', - 'video.js': 'videojs' - }, legacy: true, plugins: [ multiEntry({ diff --git a/scripts/umd.rollup.config.js b/scripts/umd.rollup.config.js index 36bcce03..81fc7946 100644 --- a/scripts/umd.rollup.config.js +++ b/scripts/umd.rollup.config.js @@ -11,18 +11,18 @@ import resolve from 'rollup-plugin-node-resolve'; import replace from './rollup-replace'; export default { - name: 'videojsVr', input: 'src/plugin.js', output: { + name: 'videojsVr', file: 'dist/videojs-vr.js', - format: 'umd' + format: 'umd', + globals: { + 'video.js': 'videojs' + } }, external: [ 'video.js' ], - globals: { - 'video.js': 'videojs' - }, legacy: true, plugins: [ resolve({