mirror of
https://github.com/iv-org/videojs-vtt-thumbnails.git
synced 2025-08-11 07:50:28 -04:00
Initial commit
This commit is contained in:
commit
f0a97f8e13
23 changed files with 1020 additions and 0 deletions
6
scripts/banner.ejs
Normal file
6
scripts/banner.ejs
Normal file
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* <%- pkg.name %>
|
||||
* @version <%- pkg.version %>
|
||||
* @copyright <%- date.getFullYear() %> <%- pkg.author %>
|
||||
* @license <%- pkg.license %>
|
||||
*/
|
47
scripts/modules.rollup.config.js
Normal file
47
scripts/modules.rollup.config.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Rollup configuration for packaging the plugin in a module that is consumable
|
||||
* by either CommonJS (e.g. Node or Browserify) or ECMAScript (e.g. Rollup).
|
||||
*
|
||||
* These modules DO NOT include their dependencies as we expect those to be
|
||||
* handled by the module system.
|
||||
*/
|
||||
import babel from 'rollup-plugin-babel';
|
||||
import json from 'rollup-plugin-json';
|
||||
|
||||
export default {
|
||||
name: 'videojsVttThumbnails',
|
||||
input: 'src/plugin.js',
|
||||
output: [{
|
||||
file: 'dist/videojs-vtt-thumbnails.cjs.js',
|
||||
format: 'cjs'
|
||||
}, {
|
||||
file: 'dist/videojs-vtt-thumbnails.es.js',
|
||||
format: 'es'
|
||||
}],
|
||||
external: [
|
||||
'global',
|
||||
'global/document',
|
||||
'global/window',
|
||||
'video.js'
|
||||
],
|
||||
globals: {
|
||||
'video.js': 'videojs'
|
||||
},
|
||||
plugins: [
|
||||
json(),
|
||||
babel({
|
||||
babelrc: false,
|
||||
exclude: 'node_modules/**',
|
||||
presets: [
|
||||
['es2015', {
|
||||
loose: true,
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'external-helpers',
|
||||
'transform-object-assign'
|
||||
]
|
||||
})
|
||||
]
|
||||
};
|
59
scripts/test.rollup.config.js
Normal file
59
scripts/test.rollup.config.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* Rollup configuration for packaging the plugin in a test bundle.
|
||||
*
|
||||
* This includes all dependencies for both the plugin and its tests.
|
||||
*/
|
||||
import babel from 'rollup-plugin-babel';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import json from 'rollup-plugin-json';
|
||||
import multiEntry from 'rollup-plugin-multi-entry';
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
name: 'videojsVttThumbnailsTests',
|
||||
input: 'test/**/*.test.js',
|
||||
output: {
|
||||
file: 'test/dist/bundle.js',
|
||||
format: 'iife'
|
||||
},
|
||||
external: [
|
||||
'qunit',
|
||||
'qunitjs',
|
||||
'sinon',
|
||||
'video.js'
|
||||
],
|
||||
globals: {
|
||||
'qunit': 'QUnit',
|
||||
'qunitjs': 'QUnit',
|
||||
'sinon': 'sinon',
|
||||
'video.js': 'videojs'
|
||||
},
|
||||
plugins: [
|
||||
multiEntry({
|
||||
exports: false
|
||||
}),
|
||||
resolve({
|
||||
browser: true,
|
||||
main: true,
|
||||
jsnext: true
|
||||
}),
|
||||
json(),
|
||||
commonjs({
|
||||
sourceMap: false
|
||||
}),
|
||||
babel({
|
||||
babelrc: false,
|
||||
exclude: 'node_modules/**',
|
||||
presets: [
|
||||
['es2015', {
|
||||
loose: true,
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'external-helpers',
|
||||
'transform-object-assign'
|
||||
]
|
||||
})
|
||||
]
|
||||
};
|
50
scripts/umd.rollup.config.js
Normal file
50
scripts/umd.rollup.config.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* Rollup configuration for packaging the plugin in a module that is consumable
|
||||
* as the `src` of a `script` tag or via AMD or similar client-side loading.
|
||||
*
|
||||
* This module DOES include its dependencies.
|
||||
*/
|
||||
import babel from 'rollup-plugin-babel';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import json from 'rollup-plugin-json';
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
name: 'videojsVttThumbnails',
|
||||
input: 'src/plugin.js',
|
||||
output: {
|
||||
file: 'dist/videojs-vtt-thumbnails.js',
|
||||
format: 'umd'
|
||||
},
|
||||
external: [
|
||||
'video.js'
|
||||
],
|
||||
globals: {
|
||||
'video.js': 'videojs'
|
||||
},
|
||||
plugins: [
|
||||
resolve({
|
||||
browser: true,
|
||||
main: true,
|
||||
jsnext: true
|
||||
}),
|
||||
json(),
|
||||
commonjs({
|
||||
sourceMap: false
|
||||
}),
|
||||
babel({
|
||||
babelrc: false,
|
||||
exclude: 'node_modules/**',
|
||||
presets: [
|
||||
['es2015', {
|
||||
loose: true,
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'external-helpers',
|
||||
'transform-object-assign'
|
||||
]
|
||||
})
|
||||
]
|
||||
};
|
10
scripts/version.js
Normal file
10
scripts/version.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
const execSync = require('child_process').execSync;
|
||||
const path = require('path');
|
||||
const semver = require('semver');
|
||||
const pkg = require('../package.json');
|
||||
|
||||
if (!semver.prerelease(pkg.version)) {
|
||||
process.chdir(path.resolve(__dirname, '..'));
|
||||
execSync('conventional-changelog -p videojs -i CHANGELOG.md -s');
|
||||
execSync('git add CHANGELOG.md');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue