mirror of
https://github.com/videojs/video.js.git
synced 2025-07-05 00:58:52 +02:00
chore: package json cleanup (#5649)
This commit is contained in:
committed by
Gary Katsevman
parent
bd58039c78
commit
85ad44e13e
@ -1,57 +1,37 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const zlib = require('zlib');
|
const zlib = require('zlib');
|
||||||
const Promise = require('bluebird');
|
|
||||||
const klawSync = require('klaw-sync');
|
|
||||||
const filesize = require('filesize');
|
const filesize = require('filesize');
|
||||||
const Table = require('cli-table');
|
const Table = require('cli-table');
|
||||||
|
const path = require('path');
|
||||||
|
const sh = require('shelljs');
|
||||||
|
|
||||||
const files = klawSync('dist/', {
|
// find all js/css files in the dist dir
|
||||||
ignore: ['examples', 'lang', 'font', '*.zip', '*.gz'],
|
// but ignore any files in lang, example, or font directories
|
||||||
nodir: true
|
const filepaths = sh
|
||||||
});
|
.find(path.join(__dirname, '..', 'dist', '**', '*.{js,css}'))
|
||||||
|
.filter((filepath) => !(/\/(lang|example|font)\//).test(filepath));
|
||||||
|
|
||||||
Promise.all(files.map(gzipAndStat))
|
// map all files that we found into an array of
|
||||||
.then(mapFiles)
|
// table entries the filepath, file size, and gzip size.
|
||||||
.then(function(files) {
|
Promise.all(filepaths.map(function(filepath) {
|
||||||
logTable(files);
|
|
||||||
|
|
||||||
return files;
|
|
||||||
})
|
|
||||||
.then(cleanup)
|
|
||||||
.catch(function(err) {
|
|
||||||
console.error(err.stack);
|
|
||||||
});
|
|
||||||
|
|
||||||
function cleanup(files) {
|
|
||||||
files.forEach(function(file) {
|
|
||||||
fs.unlinkSync('dist/' + file[0] + '.gz');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function mapFiles(files) {
|
|
||||||
return files.map(function(file) {
|
|
||||||
const path = file[0].path;
|
|
||||||
const fileStat = file[0].stats;
|
|
||||||
const gzStat = file[1];
|
|
||||||
return [file[0].path.split('dist/')[1], filesize(fileStat.size), filesize(gzStat.size)];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function gzipAndStat(file) {
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
const readStream = fs.createReadStream(file.path);
|
const readStream = fs.createReadStream(filepath);
|
||||||
const writeStream = fs.createWriteStream(file.path + '.gz');
|
const writeStream = fs.createWriteStream(filepath + '.gz');
|
||||||
const gzip = zlib.createGzip();
|
const gzip = zlib.createGzip();
|
||||||
readStream.pipe(gzip).pipe(writeStream).on('close', function() {
|
|
||||||
const gzStat = fs.statSync(file.path + '.gz');
|
|
||||||
|
|
||||||
resolve([file, gzStat]);
|
readStream.pipe(gzip).pipe(writeStream).on('close', function() {
|
||||||
|
const gzStat = fs.statSync(filepath + '.gz');
|
||||||
|
const fileStat = fs.statSync(filepath);
|
||||||
|
|
||||||
|
fs.unlinkSync(filepath + '.gz');
|
||||||
|
|
||||||
|
resolve([filepath.split('dist/')[1], filesize(fileStat.size), filesize(gzStat.size)]);
|
||||||
})
|
})
|
||||||
.on('error', reject);
|
.on('error', reject);
|
||||||
});
|
});
|
||||||
}
|
})).then(function(lines) {
|
||||||
|
// log all the files and there sizes using a cli table
|
||||||
function logTable(files) {
|
|
||||||
const table = new Table({
|
const table = new Table({
|
||||||
head: ['filename', 'size', 'gzipped'],
|
head: ['filename', 'size', 'gzipped'],
|
||||||
colAligns: ['left', 'right', 'right'],
|
colAligns: ['left', 'right', 'right'],
|
||||||
@ -60,6 +40,9 @@ function logTable(files) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
table.push.apply(table, files);
|
table.push.apply(table, lines);
|
||||||
console.log(table.toString());
|
console.log(table.toString());
|
||||||
}
|
|
||||||
|
}).catch(function(err) {
|
||||||
|
console.error(err.stack);
|
||||||
|
});
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
var unified = require('unified');
|
/* eslint-disable no-console */
|
||||||
var markdown = require('remark-parse');
|
|
||||||
var stringify = require('remark-stringify');
|
const unified = require('unified');
|
||||||
var fs = require('fs');
|
const markdown = require('remark-parse');
|
||||||
|
const stringify = require('remark-stringify');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
module.exports = function() {
|
module.exports = function() {
|
||||||
var processor = unified()
|
const processor = unified()
|
||||||
.use(markdown, {commonmark: true})
|
.use(markdown, {commonmark: true})
|
||||||
.use(stringify);
|
.use(stringify);
|
||||||
|
|
||||||
var ast = processor.parse(fs.readFileSync('./CHANGELOG.md'));
|
const ast = processor.parse(fs.readFileSync('./CHANGELOG.md'));
|
||||||
|
const changelog = [];
|
||||||
|
|
||||||
var changelog = [];
|
|
||||||
changelog.push(processor.stringify(ast.children[0]));
|
changelog.push(processor.stringify(ast.children[0]));
|
||||||
|
|
||||||
// start at 1 so we get the first anchor tag
|
// start at 1 so we get the first anchor tag
|
||||||
// and can break on the second
|
// and can break on the second
|
||||||
for (var i = 1; i < ast.children.length; i++) {
|
for (let i = 1; i < ast.children.length; i++) {
|
||||||
var item = processor.stringify(ast.children[i]);
|
let item = processor.stringify(ast.children[i]);
|
||||||
|
|
||||||
if (/^<a name="/.test(item)) {
|
if (/^<a name="/.test(item)) {
|
||||||
break;
|
break;
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
import sh from 'shelljs';
|
const sh = require('shelljs');
|
||||||
import path from 'path';
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = function(commit, commitRange) {
|
||||||
export default function(commit, commitRange) {
|
|
||||||
const SINGLE_COMMIT = `git diff-tree --no-commit-id --name-only -r ${commit}`;
|
const SINGLE_COMMIT = `git diff-tree --no-commit-id --name-only -r ${commit}`;
|
||||||
const COMMIT_RANGE = `git diff --name-only ${commitRange}`;
|
const COMMIT_RANGE = `git diff --name-only ${commitRange}`;
|
||||||
|
|
||||||
let command = SINGLE_COMMIT;
|
let command = SINGLE_COMMIT;
|
||||||
|
|
||||||
if (commitRange) {
|
if (commitRange) {
|
||||||
command = COMMIT_RANGE
|
command = COMMIT_RANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const output = sh.exec(command, {async: false, silent: true}).stdout;
|
const output = sh.exec(command, {async: false, silent: true}).stdout;
|
||||||
|
|
||||||
const files = output.split('\n').filter(Boolean);
|
const files = output.split('\n').filter(Boolean);
|
||||||
|
|
||||||
return files.every((file) => file.startsWith('docs') || path.extname(file) === '.md');
|
return files.every((file) => file.startsWith('docs') || path.extname(file) === '.md');
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
var replace = require("replace");
|
const replace = require('replace');
|
||||||
var path = require('path')
|
const path = require('path');
|
||||||
var apiPath = path.join(__dirname, '..', 'docs', 'api');
|
const apiPath = path.join(__dirname, '..', 'docs', 'api');
|
||||||
|
|
||||||
var replacements = [
|
const replacements = [
|
||||||
{find: /\/docs\/guides\/(.+)\.md/g, replace: 'tutorial-$1.html'},
|
{find: /\/docs\/guides\/(.+)\.md/g, replace: 'tutorial-$1.html'},
|
||||||
{find: /tutorial-tech.html/g, replace: 'tutorial-tech_.html'},
|
{find: /tutorial-tech.html/g, replace: 'tutorial-tech_.html'},
|
||||||
{find: /\/docs\/guides\//g, replace: '#'},
|
{find: /\/docs\/guides\//g, replace: '#'},
|
||||||
@ -32,7 +32,6 @@ var replacements = [
|
|||||||
{find: '<h2 id="guides-docs-guides">', replace: '<h2 id="guides">'}
|
{find: '<h2 id="guides-docs-guides">', replace: '<h2 id="guides">'}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
replacements.forEach(function(obj) {
|
replacements.forEach(function(obj) {
|
||||||
replace({
|
replace({
|
||||||
regex: obj.find,
|
regex: obj.find,
|
||||||
|
@ -1,24 +1,23 @@
|
|||||||
import path from 'path';
|
const path = require('path');
|
||||||
import fs from 'fs';
|
const fs = require('fs');
|
||||||
import sh from 'shelljs';
|
const sh = require('shelljs');
|
||||||
import klawSync from 'klaw-sync';
|
const pkg = require('../package.json');
|
||||||
import pkg from '../package.json';
|
|
||||||
|
|
||||||
const dest = 'docs/api/';
|
const dest = path.join(__dirname, '..', 'docs', 'api');
|
||||||
const vjsFlash = 'node_modules/videojs-flash';
|
const vjsFlash = path.join(__dirname, '..', 'node_modules', 'videojs-flash');
|
||||||
const vjsSwf = 'node_modules/videojs-swf/';
|
const vjsSwf = path.join('node_modules', 'videojs-swf');
|
||||||
const distDest = path.join(dest, 'dist');
|
const distDest = path.join(dest, 'dist');
|
||||||
const exampleDest = path.join(dest, 'test-example');
|
const exampleDest = path.join(dest, 'test-example');
|
||||||
const vjsFlashDest = path.join(dest, vjsFlash, 'dist');
|
const vjsFlashDest = path.join(dest, vjsFlash, 'dist');
|
||||||
const swfDest = path.join(dest, vjsFlash, vjsSwf, 'dist');
|
const swfDest = path.join(dest, vjsFlash, vjsSwf, 'dist');
|
||||||
|
|
||||||
export function cleanupExample() {
|
const cleanupExample = function() {
|
||||||
sh.rm('-rf', distDest);
|
sh.rm('-rf', distDest);
|
||||||
sh.rm('-rf', exampleDest);
|
sh.rm('-rf', exampleDest);
|
||||||
sh.rm('-rf', path.join(dest, 'node_modules'));
|
sh.rm('-rf', path.join(dest, 'node_modules'));
|
||||||
}
|
};
|
||||||
|
|
||||||
export default function generateExample({skipBuild} = {}) {
|
const generateExample = function({skipBuild} = {}) {
|
||||||
// run the build
|
// run the build
|
||||||
if (!skipBuild) {
|
if (!skipBuild) {
|
||||||
sh.exec('npm run build');
|
sh.exec('npm run build');
|
||||||
@ -42,11 +41,18 @@ export default function generateExample({skipBuild} = {}) {
|
|||||||
sh.cp(path.join(vjsSwf, 'dist', 'video-js.swf'), swfDest);
|
sh.cp(path.join(vjsSwf, 'dist', 'video-js.swf'), swfDest);
|
||||||
}
|
}
|
||||||
|
|
||||||
const files = klawSync('sandbox/').filter((file) => path.extname(file.path) === '.example');
|
const filepaths = sh.find(path.join(__dirname, '..', 'sandbox', '**', '*.*'))
|
||||||
|
.filter((filepath) => path.extname(filepath) === '.example');
|
||||||
|
|
||||||
// copy the sandbox example files
|
// copy the sandbox example files
|
||||||
files.forEach(function(file) {
|
filepaths.forEach(function(filepath) {
|
||||||
const p = path.parse(file.path);
|
const p = path.parse(filepath);
|
||||||
sh.cp(file.path, path.join(exampleDest, p.name));
|
|
||||||
|
sh.cp(filepath, path.join(exampleDest, p.name));
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
cleanupExample,
|
||||||
|
generateExample
|
||||||
|
};
|
||||||
|
@ -1,24 +1,14 @@
|
|||||||
var ghrelease = require('gh-release');
|
/* eslint-disable no-console */
|
||||||
var currentChangelog = require('./current-changelog.js');
|
|
||||||
var safeParse = require('safe-json-parse/tuple');
|
|
||||||
var pkg = require('../package.json')
|
|
||||||
var minimist = require('minimist');
|
|
||||||
|
|
||||||
var args = minimist(process.argv.slice(2), {
|
const ghrelease = require('gh-release');
|
||||||
boolean: ['prerelease'],
|
const currentChangelog = require('./current-changelog.js');
|
||||||
default: {
|
const safeParse = require('safe-json-parse/tuple');
|
||||||
prerelease: false
|
const pkg = require('../package.json');
|
||||||
},
|
const options = {
|
||||||
alias: {
|
|
||||||
p: 'prerelease'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var options = {
|
|
||||||
owner: 'videojs',
|
owner: 'videojs',
|
||||||
repo: 'video.js',
|
repo: 'video.js',
|
||||||
body: currentChangelog(),
|
body: currentChangelog(),
|
||||||
assets: ['./dist/video-js-'+pkg.version+'.zip'],
|
assets: ['./dist/video-js-' + pkg.version + '.zip'],
|
||||||
endpoint: 'https://api.github.com',
|
endpoint: 'https://api.github.com',
|
||||||
auth: {
|
auth: {
|
||||||
username: process.env.VJS_GITHUB_USER,
|
username: process.env.VJS_GITHUB_USER,
|
||||||
@ -26,10 +16,22 @@ var options = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var tuple = safeParse(process.env.npm_config_argv);
|
let i = process.argv.length;
|
||||||
var npmargs = tuple[0] ? [] : tuple[1].cooked;
|
|
||||||
|
|
||||||
if (args.prerelease || npmargs.some(function(arg) { return /next/.test(arg); })) {
|
while (i--) {
|
||||||
|
const arg = process.argv[i];
|
||||||
|
|
||||||
|
if (arg === '-p' || arg === '--prerelease') {
|
||||||
|
options.prerelease = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const tuple = safeParse(process.env.npm_config_argv);
|
||||||
|
const npmargs = tuple[0] ? [] : tuple[1].cooked;
|
||||||
|
|
||||||
|
if (npmargs.some(function(arg) {
|
||||||
|
return /next/.test(arg);
|
||||||
|
})) {
|
||||||
options.prerelease = true;
|
options.prerelease = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import fs from 'fs';
|
/* eslint-disable no-console, camelcase */
|
||||||
import uglify from 'uglify-js';
|
|
||||||
import maxmin from 'maxmin';
|
const fs = require('fs');
|
||||||
|
const uglify = require('uglify-js');
|
||||||
|
const maxmin = require('maxmin');
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
nameCache: {},
|
nameCache: {},
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
const sh = require('shelljs');
|
const sh = require('shelljs');
|
||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
const generateExample = require('./generate-example.js').default;
|
const generateExample = require('./generate-example.js').generateExample;
|
||||||
|
|
||||||
const GIT_LOG = `git log --format=%B -n 1 ${process.env.COMMIT_REF}`;
|
const GIT_LOG = `git log --format=%B -n 1 ${process.env.COMMIT_REF}`;
|
||||||
const output = sh.exec(GIT_LOG, {async: false, silent:true}).stdout;
|
const output = sh.exec(GIT_LOG, {async: false, silent: true}).stdout;
|
||||||
|
|
||||||
// if we're on master branch and not on a tagged commit,
|
// if we're on master branch and not on a tagged commit,
|
||||||
// error the build so it doesn't redeploy the docs
|
// error the build so it doesn't redeploy the docs
|
||||||
|
@ -1,18 +1,21 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const klawSync = require('klaw-sync');
|
const sh = require('shelljs');
|
||||||
|
|
||||||
const files = klawSync('sandbox/').filter((file) => path.extname(file.path) === '.example');
|
const files = sh.find(path.join(__dirname, '..', 'sandbox', '**', '*.*'))
|
||||||
|
.filter((filepath) => path.extname(filepath) === '.example');
|
||||||
|
|
||||||
const changes = files.map(function(file) {
|
const changes = files.map(function(file) {
|
||||||
const p = path.parse(file.path);
|
const p = path.parse(file.path);
|
||||||
const nonExample = path.join(p.dir, p.name);
|
const nonExample = path.join(p.dir, p.name);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
file: file.path,
|
file: file.path,
|
||||||
copy: nonExample
|
copy: nonExample
|
||||||
};
|
};
|
||||||
})
|
}).filter(function(change) {
|
||||||
.filter(function(change) {
|
|
||||||
return !fs.existsSync(change.copy);
|
return !fs.existsSync(change.copy);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -21,8 +24,8 @@ changes.forEach(function(change) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (changes.length) {
|
if (changes.length) {
|
||||||
console.log("Updated Sandbox files for:");
|
console.log('Updated Sandbox files for:');
|
||||||
console.log('\t' + changes.map((chg) => chg.copy).join('\n\t'));
|
console.log('\t' + changes.map((chg) => chg.copy).join('\n\t'));
|
||||||
} else {
|
} else {
|
||||||
console.log("No sandbox updates necessary");
|
console.log('No sandbox updates necessary');
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,8 @@ const options = {
|
|||||||
|
|
||||||
AccessSniff.default(testFiles, options).then(function(report) {
|
AccessSniff.default(testFiles, options).then(function(report) {
|
||||||
AccessSniff.report(report);
|
AccessSniff.report(report);
|
||||||
}).catch(function(error) {
|
}).catch(function() {
|
||||||
|
|
||||||
// there were errors, which are already reported, exit with an error
|
// there were errors, which are already reported, exit with an error
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const klawSync = require('klaw-sync');
|
const sh = require('shelljs');
|
||||||
|
|
||||||
const source = require('../lang/en.json');
|
const source = require('../lang/en.json');
|
||||||
const table = require('markdown-table');
|
const table = require('markdown-table');
|
||||||
const tableRegex = /(<!-- START langtable -->)(.|\n)*(<!-- END langtable -->)/;
|
const tableRegex = /(<!-- START langtable -->)(.|\n)*(<!-- END langtable -->)/;
|
||||||
|
|
||||||
let doc = fs.readFileSync('docs/translations-needed.md', 'utf8');
|
let doc = fs.readFileSync(path.join(__dirname, '..', 'docs', 'translations-needed.md'), 'utf8');
|
||||||
let tableData = [['Language file', 'Missing translations']];
|
const tableData = [['Language file', 'Missing translations']];
|
||||||
|
|
||||||
const files = klawSync('lang');
|
const filepaths = sh.find(path.join(__dirname, '..', 'lang', '**', '!(zh-Hans|zh-Hant)*.json'));
|
||||||
|
|
||||||
files.forEach((file) => {
|
filepaths.forEach((filepath) => {
|
||||||
const filename = path.basename(file.path);
|
const filename = path.basename(filepath);
|
||||||
|
|
||||||
if (filename === 'en.json') {
|
if (filename === 'en.json') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const target = require(file.path);
|
const target = require(filepath);
|
||||||
let missing = [];
|
const missing = [];
|
||||||
|
|
||||||
for (const string in source) {
|
for (const string in source) {
|
||||||
if (!target[string]) {
|
if (!target[string]) {
|
||||||
console.log(`${filename} missing "${string}"`);
|
console.log(`${filename} missing "${string}"`);
|
||||||
@ -29,7 +32,7 @@ files.forEach((file) => {
|
|||||||
if (missing.length > 0) {
|
if (missing.length > 0) {
|
||||||
console.error(`${filename} is missing ${missing.length} translations.`);
|
console.error(`${filename} is missing ${missing.length} translations.`);
|
||||||
tableData.push([`${filename} (missing ${missing.length})`, missing[0]]);
|
tableData.push([`${filename} (missing ${missing.length})`, missing[0]]);
|
||||||
for (var i = 1; i < missing.length; i++) {
|
for (let i = 1; i < missing.length; i++) {
|
||||||
tableData.push(['', missing[i]]);
|
tableData.push(['', missing[i]]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -38,5 +41,5 @@ files.forEach((file) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
doc = doc.replace(tableRegex, `$1\n` + table(tableData) + `\n$3`);
|
doc = doc.replace(tableRegex, '$1\n' + table(tableData) + '\n$3');
|
||||||
fs.writeFileSync('docs/translations-needed.md', doc, 'utf8');
|
fs.writeFileSync(path.join(__dirname, '..', 'docs', 'translations-needed.md'), doc, 'utf8');
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
var safeParse = require("safe-json-parse/tuple");
|
|
||||||
var tuple = safeParse(process.env.npm_config_argv);
|
|
||||||
var npm_config_argv = tuple[1]
|
|
||||||
|
|
||||||
if (tuple[0]) {
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
var sh = require('shelljs');
|
|
||||||
var prereleaseType = npm_config_argv['remain'][0];
|
|
||||||
var approvedTypes = {
|
|
||||||
'major': 1,
|
|
||||||
'minor': 1,
|
|
||||||
'patch': 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prereleaseType in approvedTypes) {
|
|
||||||
sh.exec('npm run changelog');
|
|
||||||
}
|
|
@ -13,6 +13,7 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
|||||||
## Status of translations
|
## Status of translations
|
||||||
|
|
||||||
<!-- START langtable -->
|
<!-- START langtable -->
|
||||||
|
|
||||||
| Language file | Missing translations |
|
| Language file | Missing translations |
|
||||||
| ----------------------- | ----------------------------------------------------------------------------------- |
|
| ----------------------- | ----------------------------------------------------------------------------------- |
|
||||||
| ar.json (missing 53) | Audio Player |
|
| ar.json (missing 53) | Audio Player |
|
||||||
@ -1052,7 +1053,6 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
|||||||
| | Seek to live, currently playing live |
|
| | Seek to live, currently playing live |
|
||||||
| | {1} is loading. |
|
| | {1} is loading. |
|
||||||
| zh-CN.json (Complete) | |
|
| zh-CN.json (Complete) | |
|
||||||
| zh-Hans.json (Complete) | |
|
|
||||||
| zh-Hant.json (Complete) | |
|
|
||||||
| zh-TW.json (Complete) | |
|
| zh-TW.json (Complete) | |
|
||||||
|
|
||||||
<!-- END langtable -->
|
<!-- END langtable -->
|
||||||
|
790
package-lock.json
generated
790
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
39
package.json
39
package.json
@ -44,7 +44,7 @@
|
|||||||
"build:lang": "vjslang --dir dist/lang",
|
"build:lang": "vjslang --dir dist/lang",
|
||||||
"postbuild:lang": "shx cp -R lang/* dist/lang/",
|
"postbuild:lang": "shx cp -R lang/* dist/lang/",
|
||||||
"minify": "npm-run-all minify:*",
|
"minify": "npm-run-all minify:*",
|
||||||
"minify:js": "babel-node build/minify.js",
|
"minify:js": "node build/minify.js",
|
||||||
"minify:css": "npm-run-all minify:css:*",
|
"minify:css": "npm-run-all minify:css:*",
|
||||||
"minify:css:cdn": "cleancss dist/alt/video-js-cdn.css -o dist/alt/video-js-cdn.min.css",
|
"minify:css:cdn": "cleancss dist/alt/video-js-cdn.css -o dist/alt/video-js-cdn.min.css",
|
||||||
"minify:css:default": "cleancss dist/video-js.css -o dist/video-js.min.css",
|
"minify:css:default": "cleancss dist/video-js.css -o dist/video-js.min.css",
|
||||||
@ -69,10 +69,10 @@
|
|||||||
"docs:lint": "remark -- './{,!(node_modules)/**/}!(CHANGELOG)*.md'",
|
"docs:lint": "remark -- './{,!(node_modules)/**/}!(CHANGELOG)*.md'",
|
||||||
"docs:fix": "remark --output -- './{,!(node_modules)/**/}!(CHANGELOG)*.md'",
|
"docs:fix": "remark --output -- './{,!(node_modules)/**/}!(CHANGELOG)*.md'",
|
||||||
"docs:lang": "node build/translations.js",
|
"docs:lang": "node build/translations.js",
|
||||||
"netlify": "babel-node ./build/netlify-docs.js",
|
"netlify": "node ./build/netlify-docs.js",
|
||||||
"prepublishOnly": "run-p build",
|
"prepublishOnly": "run-p build",
|
||||||
"publish": "node build/gh-release.js",
|
"publish": "node build/gh-release.js",
|
||||||
"version": "node build/version.js && git add CHANGELOG.md",
|
"version": "is-prerelease || npm run changelog && git add CHANGELOG.md",
|
||||||
"zip": "cd dist && cross-env bestzip \"./video-js-${npm_package_version}.zip\" * && cd .."
|
"zip": "cd dist && cross-env bestzip \"./video-js-${npm_package_version}.zip\" * && cd .."
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -90,18 +90,14 @@
|
|||||||
"@videojs/xhr": "2.5.1"
|
"@videojs/xhr": "2.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.4.4",
|
|
||||||
"@babel/core": "^7.4.5",
|
"@babel/core": "^7.4.5",
|
||||||
"@babel/node": "^7.4.5",
|
|
||||||
"@babel/plugin-transform-object-assign": "^7.2.0",
|
"@babel/plugin-transform-object-assign": "^7.2.0",
|
||||||
"@babel/plugin-transform-runtime": "^7.5.5",
|
"@babel/plugin-transform-runtime": "^7.5.5",
|
||||||
"@babel/preset-env": "^7.4.5",
|
"@babel/preset-env": "^7.4.5",
|
||||||
"@babel/register": "^7.4.4",
|
|
||||||
"access-sniff": "^3.2.0",
|
"access-sniff": "^3.2.0",
|
||||||
"autoprefixer": "^9.6.0",
|
"autoprefixer": "^9.6.0",
|
||||||
"babelify": "^10.0.0",
|
"babelify": "^10.0.0",
|
||||||
"bestzip": "^2.1.4",
|
"bestzip": "^2.1.4",
|
||||||
"bluebird": "^3.5.5",
|
|
||||||
"browserify": "^16.2.3",
|
"browserify": "^16.2.3",
|
||||||
"browserify-istanbul": "^3.0.1",
|
"browserify-istanbul": "^3.0.1",
|
||||||
"chokidar-cli": "^1.2.2",
|
"chokidar-cli": "^1.2.2",
|
||||||
@ -119,11 +115,10 @@
|
|||||||
"jsdoc": "^3.6.2",
|
"jsdoc": "^3.6.2",
|
||||||
"karma": "^4.1.0",
|
"karma": "^4.1.0",
|
||||||
"karma-browserify": "^5.3.0",
|
"karma-browserify": "^5.3.0",
|
||||||
"klaw-sync": "^6.0.0",
|
|
||||||
"lint-staged": "^8.2.0",
|
"lint-staged": "^8.2.0",
|
||||||
"markdown-table": "^1.1.3",
|
"markdown-table": "^1.1.3",
|
||||||
"maxmin": "^2.1.0",
|
"maxmin": "^2.1.0",
|
||||||
"minimist": "^1.2.0",
|
"not-prerelease": "^1.0.1",
|
||||||
"npm-merge-driver-install": "^1.1.1",
|
"npm-merge-driver-install": "^1.1.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"postcss-cli": "^6.1.2",
|
"postcss-cli": "^6.1.2",
|
||||||
@ -156,22 +151,16 @@
|
|||||||
"videojs-generate-karma-config": "~5.2.1",
|
"videojs-generate-karma-config": "~5.2.1",
|
||||||
"videojs-languages": "^2.0.0",
|
"videojs-languages": "^2.0.0",
|
||||||
"videojs-standard": "^8.0.3",
|
"videojs-standard": "^8.0.3",
|
||||||
"watchify": "^3.11.1",
|
"watchify": "^3.11.0",
|
||||||
"webpack": "^1.15.0"
|
"webpack": "^1.15.0"
|
||||||
},
|
},
|
||||||
"vjsstandard": {
|
"vjsstandard": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"**/es5/**",
|
"dist",
|
||||||
"**/build/**",
|
"docs",
|
||||||
"!build/rollup.js",
|
"test/dist",
|
||||||
"core.js",
|
"test/api",
|
||||||
"**/dist/**",
|
"core.js"
|
||||||
"**/docs/**",
|
|
||||||
"**/lang/**",
|
|
||||||
"**/sandbox/**",
|
|
||||||
"**/test/api/**",
|
|
||||||
"**/test/dist/coverage/**",
|
|
||||||
"**/test/karma.conf.js"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"greenkeeper": {
|
"greenkeeper": {
|
||||||
@ -188,6 +177,14 @@
|
|||||||
"*.js": [
|
"*.js": [
|
||||||
"vjsstandard --fix",
|
"vjsstandard --fix",
|
||||||
"git add"
|
"git add"
|
||||||
|
],
|
||||||
|
"!(CHANGELOG)*.md": [
|
||||||
|
"remark --output --",
|
||||||
|
"git add"
|
||||||
|
],
|
||||||
|
"lang/**/!(zh-Hans|zh-Hant)*.json": [
|
||||||
|
"node build/translations.js",
|
||||||
|
"git add docs/translations-needed.md"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,8 +78,7 @@ const globals = {
|
|||||||
|
|
||||||
const moduleExternals = [
|
const moduleExternals = [
|
||||||
'global',
|
'global',
|
||||||
'xhr',
|
'@videojs/xhr',
|
||||||
'tsml',
|
|
||||||
'safe-json-parse',
|
'safe-json-parse',
|
||||||
'videojs-vtt.js',
|
'videojs-vtt.js',
|
||||||
'url-toolkit',
|
'url-toolkit',
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
const generate = require('videojs-generate-karma-config');
|
const generate = require('videojs-generate-karma-config');
|
||||||
|
|
||||||
module.exports = function(config) {
|
module.exports = function(config) {
|
||||||
const coverageFlag = process.env.npm_config_coverage;
|
// const coverageFlag = process.env.npm_config_coverage;
|
||||||
const reportCoverage = false; // process.env.TRAVIS || coverageFlag || false;
|
// process.env.TRAVIS || coverageFlag || false;
|
||||||
|
const reportCoverage = false;
|
||||||
|
|
||||||
// see https://github.com/videojs/videojs-generate-karma-config
|
// see https://github.com/videojs/videojs-generate-karma-config
|
||||||
// for options
|
// for options
|
||||||
@ -14,7 +15,7 @@ module.exports = function(config) {
|
|||||||
serverBrowsers(defaults) {
|
serverBrowsers(defaults) {
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
coverage: reportCoverage,
|
coverage: reportCoverage
|
||||||
};
|
};
|
||||||
|
|
||||||
config = generate(config, options);
|
config = generate(config, options);
|
||||||
@ -44,7 +45,7 @@ module.exports = function(config) {
|
|||||||
debug: true,
|
debug: true,
|
||||||
plugin: ['proxyquireify/plugin'],
|
plugin: ['proxyquireify/plugin'],
|
||||||
transform: [
|
transform: [
|
||||||
['babelify', {"presets": [["@babel/preset-env", {"loose": true}]]}],
|
['babelify', {presets: [['@babel/preset-env', {loose: true}]]}]
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -52,14 +53,15 @@ module.exports = function(config) {
|
|||||||
config.browserify.transform.push('browserify-istanbul');
|
config.browserify.transform.push('browserify-istanbul');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
config.preprocessors = {
|
config.preprocessors = {
|
||||||
'test/globals-shim.js': ['browserify'],
|
'test/globals-shim.js': ['browserify'],
|
||||||
'test/unit/**/*.js': ['browserify'],
|
'test/unit/**/*.js': ['browserify']
|
||||||
};
|
};
|
||||||
|
|
||||||
// pin Browserstack Firefox version to 64
|
// pin Browserstack Firefox version to 64
|
||||||
|
/* eslint-disable camelcase */
|
||||||
config.customLaunchers.bsFirefox.browser_version = '64.0';
|
config.customLaunchers.bsFirefox.browser_version = '64.0';
|
||||||
|
/* eslint-enable camelcase */
|
||||||
|
|
||||||
// uncomment the section below to re-enable all browserstack video recording
|
// uncomment the section below to re-enable all browserstack video recording
|
||||||
// it is off by default because it slows the build
|
// it is off by default because it slows the build
|
||||||
@ -70,4 +72,9 @@ module.exports = function(config) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
console.log(JSON.stringify(config, null, 2));
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user