Skip to content

Commit

Permalink
chore: switch to rollup-plugin-data-files (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jan 25, 2021
1 parent e4dc5d6 commit 0bb1556
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 95 deletions.
66 changes: 47 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@
"@videojs/generator-helpers": "~2.0.1",
"global": "^4.4.0",
"karma": "^5.0.0",
"rollup": "^2.28.2",
"rollup": "^2.37.1",
"rollup-plugin-data-files": "^0.1.0",
"rollup-plugin-worker-factory": "^0.3.0",
"sinon": "^8.1.1",
"videojs-generate-karma-config": "~7.0.0",
"videojs-generate-rollup-config": "~6.0.2",
"videojs-generate-karma-config": "~7.1.0",
"videojs-generate-rollup-config": "~6.2.0",
"videojs-generator-verify": "~3.0.1",
"videojs-standard": "^8.0.4"
}
Expand Down
64 changes: 0 additions & 64 deletions scripts/create-test-data.js

This file was deleted.

8 changes: 5 additions & 3 deletions scripts/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const generate = require('videojs-generate-rollup-config');
const createTestData = require('./create-test-data.js');
const dataFiles = require('rollup-plugin-data-files');
const worker = require('rollup-plugin-worker-factory');

// see https://github.com/videojs/videojs-generate-rollup-config
Expand All @@ -8,7 +8,9 @@ const worker = require('rollup-plugin-worker-factory');
const shared = {
primedPlugins(defaults) {
defaults = Object.assign(defaults, {
createTestData: createTestData()
dataFiles: dataFiles({
segments: {include: 'test/segments/**'}
})
});

defaults.worker = worker({plugins: [
Expand All @@ -24,7 +26,7 @@ const shared = {
defaults.module.splice(2, 0, 'worker');
defaults.browser.splice(2, 0, 'worker');
defaults.test.splice(3, 0, 'worker');
defaults.test.splice(0, 0, 'createTestData');
defaults.test.splice(0, 0, 'dataFiles');

// istanbul is only in the list for regular builds and not watch
if (defaults.test.indexOf('istanbul') !== -1) {
Expand Down
2 changes: 1 addition & 1 deletion test/aac-utils.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var segments = require('create-test-data!segments');
var segments = require('data-files!segments');

var
QUnit = require('qunit'),
Expand Down
2 changes: 1 addition & 1 deletion test/caption-parser.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var segments = require('create-test-data!segments');
var segments = require('data-files!segments');

var probe = require('../lib/mp4/probe');
var CaptionParser = require('../lib/mp4').CaptionParser;
Expand Down
2 changes: 1 addition & 1 deletion test/caption-stream.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var segments = require('create-test-data!segments');
var segments = require('data-files!segments');

var
captionStream,
Expand Down
2 changes: 1 addition & 1 deletion test/m2ts-probe.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var segments = require('create-test-data!segments');
var segments = require('data-files!segments');

var
QUnit = require('qunit'),
Expand Down
2 changes: 1 addition & 1 deletion test/transmuxer.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var segments = require('create-test-data!segments');
var segments = require('data-files!segments');

var mp2t = require('../lib/m2ts'),
codecs = require('../lib/codecs'),
Expand Down
2 changes: 1 addition & 1 deletion test/ts-inspector.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
var segments = require('create-test-data!segments');
var segments = require('data-files!segments');

var
QUnit = require('qunit'),
Expand Down

0 comments on commit 0bb1556

Please sign in to comment.