a2a34318 by brandonocasey

fixing directory creation for test/data and steam inclusion typo in stub.js

1 parent c27f999c
1 var fs = require('fs'); 1 var fs = require('fs');
2 var path = require('path'); 2 var path = require('path');
3 var shelljs = require('shelljs');
3 4
4 var basePath = path.resolve(__dirname + '/..'); 5 var basePath = path.resolve(__dirname, '..');
5 var testDataDir = basePath + '/test/data'; 6 var testDataDir = path.join(basePath,'test', 'data');
6 var manifestDir = basePath + '/utils/manifest'; 7 var manifestDir = path.join(basePath, 'utils', 'manifest');
7 var manifestFilepath = testDataDir + '/manifests.js'; 8 var manifestFilepath = path.join(testDataDir, 'manifests.js');
8 var expectedFilepath = testDataDir + '/expected.js'; 9 var expectedFilepath = path.join(testDataDir, 'expected.js');
9 10
10 11
11 var build = function() { 12 var build = function() {
12 var manifests = 'export default {\n'; 13 var manifests = 'export default {\n';
13 var expected = 'export default {\n'; 14 var expected = 'export default {\n';
14 15
16 shelljs.mkdir('-p', testDataDir);
15 var files = fs.readdirSync(manifestDir); 17 var files = fs.readdirSync(manifestDir);
16 while (files.length > 0) { 18 while (files.length > 0) {
17 var file = path.resolve(manifestDir, files.shift()); 19 var file = path.resolve(manifestDir, files.shift());
......
1 import m3u8 from './m3u8'; 1 import m3u8 from './m3u8';
2 import Stream from './Stream'; 2 import Stream from './stream';
3 import videojs from 'video.js'; 3 import videojs from 'video.js';
4 4
5 if(typeof window.videojs.Hls === 'undefined') { 5 if(typeof window.videojs.Hls === 'undefined') {
......