Added local server, package upgrades

This commit is contained in:
Sam Potts
2020-01-13 15:49:29 +00:00
parent aa51719a55
commit 4f263ebb1a
26 changed files with 6079 additions and 2914 deletions
+4 -4
View File
@@ -2,11 +2,11 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846 // See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format // for the documentation about the extensions.json format
"recommendations": [ "recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"wix.vscode-import-cost",
"esbenp.prettier-vscode", "esbenp.prettier-vscode",
"shinnn.stylelint", "wayou.vscode-todo-highlight",
"wayou.vscode-todo-highlight" "wix.vscode-import-cost",
"stylelint.vscode-stylelint",
"pflannery.vscode-versionlens"
] ]
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1113 -626
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+9 -32
View File
@@ -2,7 +2,7 @@ typeof navigator === "object" && (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define('Plyr', factory) : typeof define === 'function' && define.amd ? define('Plyr', factory) :
(global = global || self, global.Plyr = factory()); (global = global || self, global.Plyr = factory());
}(this, function () { 'use strict'; }(this, (function () { 'use strict';
function _classCallCheck(instance, Constructor) { function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) { if (!(instance instanceof Constructor)) {
@@ -66,6 +66,10 @@ typeof navigator === "object" && (function (global, factory) {
} }
function _iterableToArrayLimit(arr, i) { function _iterableToArrayLimit(arr, i) {
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}
var _arr = []; var _arr = [];
var _n = true; var _n = true;
var _d = false; var _d = false;
@@ -929,9 +933,6 @@ typeof navigator === "object" && (function (global, factory) {
// Attribute selector // Attribute selector
attributes[key] = value; attributes[key] = value;
break; break;
default:
break;
} }
}); });
return extend(existing, attributes); return extend(existing, attributes);
@@ -2118,9 +2119,6 @@ typeof navigator === "object" && (function (global, factory) {
case 'speed': case 'speed':
_this3.speed = parseFloat(value); _this3.speed = parseFloat(value);
break; break;
default:
break;
} }
controls.showMenuPanel.call(_this3, 'home', is$1.keyboardEvent(event)); controls.showMenuPanel.call(_this3, 'home', is$1.keyboardEvent(event));
@@ -2229,9 +2227,6 @@ typeof navigator === "object" && (function (global, factory) {
case 'progress': case 'progress':
setProgress(this.elements.display.buffer, this.buffered * 100); setProgress(this.elements.display.buffer, this.buffered * 100);
break; break;
default:
break;
} }
} }
}, },
@@ -4655,19 +4650,6 @@ typeof navigator === "object" && (function (global, factory) {
// L key // L key
player.loop = !player.loop; player.loop = !player.loop;
break; break;
/* case 73:
this.setLoop('start');
break;
case 76:
this.setLoop();
break;
case 79:
this.setLoop('end');
break; */
default:
break;
} // Escape is handle natively when in full screen } // Escape is handle natively when in full screen
// So we only need to worry about non native // So we only need to worry about non native
@@ -5397,12 +5379,13 @@ typeof navigator === "object" && (function (global, factory) {
async = args.async, async = args.async,
maxTries = (args.numRetries || 0) + 1, maxTries = (args.numRetries || 0) + 1,
beforeCallbackFn = args.before || devnull, beforeCallbackFn = args.before || devnull,
pathname = path.replace(/[\?|#].*$/, ''),
pathStripped = path.replace(/^(css|img)!/, ''), pathStripped = path.replace(/^(css|img)!/, ''),
isLegacyIECss, isLegacyIECss,
e; e;
numTries = numTries || 0; numTries = numTries || 0;
if (/(^css!|\.css$)/.test(path)) { if (/(^css!|\.css$)/.test(pathname)) {
// css // css
e = doc.createElement('link'); e = doc.createElement('link');
e.rel = 'stylesheet'; e.rel = 'stylesheet';
@@ -5415,7 +5398,7 @@ typeof navigator === "object" && (function (global, factory) {
e.rel = 'preload'; e.rel = 'preload';
e.as = 'style'; e.as = 'style';
} }
} else if (/(^img!|\.(png|gif|jpg|svg)$)/.test(path)) { } else if (/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(pathname)) {
// image // image
e = doc.createElement('img'); e = doc.createElement('img');
e.src = pathStripped; e.src = pathStripped;
@@ -6320,9 +6303,6 @@ typeof navigator === "object" && (function (global, factory) {
assurePlaybackState$1.call(player, false); assurePlaybackState$1.call(player, false);
break; break;
default:
break;
} }
triggerEvent.call(player, player.elements.container, 'statechange', false, { triggerEvent.call(player, player.elements.container, 'statechange', false, {
@@ -6736,9 +6716,6 @@ typeof navigator === "object" && (function (global, factory) {
} }
break; break;
default:
break;
} }
} }
/** /**
@@ -9128,4 +9105,4 @@ typeof navigator === "object" && (function (global, factory) {
return Plyr; return Plyr;
})); })));
+3 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -30
View File
@@ -60,6 +60,10 @@ function _iterableToArray(iter) {
} }
function _iterableToArrayLimit(arr, i) { function _iterableToArrayLimit(arr, i) {
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
return;
}
var _arr = []; var _arr = [];
var _n = true; var _n = true;
var _d = false; var _d = false;
@@ -923,9 +927,6 @@ function getAttributesFromSelector(sel, existingAttributes) {
// Attribute selector // Attribute selector
attributes[key] = value; attributes[key] = value;
break; break;
default:
break;
} }
}); });
return extend(existing, attributes); return extend(existing, attributes);
@@ -2112,9 +2113,6 @@ var controls = {
case 'speed': case 'speed':
_this3.speed = parseFloat(value); _this3.speed = parseFloat(value);
break; break;
default:
break;
} }
controls.showMenuPanel.call(_this3, 'home', is$1.keyboardEvent(event)); controls.showMenuPanel.call(_this3, 'home', is$1.keyboardEvent(event));
@@ -2223,9 +2221,6 @@ var controls = {
case 'progress': case 'progress':
setProgress(this.elements.display.buffer, this.buffered * 100); setProgress(this.elements.display.buffer, this.buffered * 100);
break; break;
default:
break;
} }
} }
}, },
@@ -4649,19 +4644,6 @@ function () {
// L key // L key
player.loop = !player.loop; player.loop = !player.loop;
break; break;
/* case 73:
this.setLoop('start');
break;
case 76:
this.setLoop();
break;
case 79:
this.setLoop('end');
break; */
default:
break;
} // Escape is handle natively when in full screen } // Escape is handle natively when in full screen
// So we only need to worry about non native // So we only need to worry about non native
@@ -5391,12 +5373,13 @@ var loadjs_umd = createCommonjsModule(function (module, exports) {
async = args.async, async = args.async,
maxTries = (args.numRetries || 0) + 1, maxTries = (args.numRetries || 0) + 1,
beforeCallbackFn = args.before || devnull, beforeCallbackFn = args.before || devnull,
pathname = path.replace(/[\?|#].*$/, ''),
pathStripped = path.replace(/^(css|img)!/, ''), pathStripped = path.replace(/^(css|img)!/, ''),
isLegacyIECss, isLegacyIECss,
e; e;
numTries = numTries || 0; numTries = numTries || 0;
if (/(^css!|\.css$)/.test(path)) { if (/(^css!|\.css$)/.test(pathname)) {
// css // css
e = doc.createElement('link'); e = doc.createElement('link');
e.rel = 'stylesheet'; e.rel = 'stylesheet';
@@ -5409,7 +5392,7 @@ var loadjs_umd = createCommonjsModule(function (module, exports) {
e.rel = 'preload'; e.rel = 'preload';
e.as = 'style'; e.as = 'style';
} }
} else if (/(^img!|\.(png|gif|jpg|svg)$)/.test(path)) { } else if (/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(pathname)) {
// image // image
e = doc.createElement('img'); e = doc.createElement('img');
e.src = pathStripped; e.src = pathStripped;
@@ -6314,9 +6297,6 @@ var youtube = {
assurePlaybackState$1.call(player, false); assurePlaybackState$1.call(player, false);
break; break;
default:
break;
} }
triggerEvent.call(player, player.elements.container, 'statechange', false, { triggerEvent.call(player, player.elements.container, 'statechange', false, {
@@ -6730,9 +6710,6 @@ function () {
} }
break; break;
default:
break;
} }
} }
/** /**
+805 -317
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+803 -315
View File
File diff suppressed because it is too large Load Diff
+11 -2
View File
@@ -1,7 +1,6 @@
// ========================================================================== // ==========================================================================
// Gulp build script // Gulp build script
// ========================================================================== // ==========================================================================
/* global require, __dirname */
/* eslint no-console: "off" */ /* eslint no-console: "off" */
const path = require('path'); const path = require('path');
@@ -41,6 +40,7 @@ const plumber = require('gulp-plumber');
const size = require('gulp-size'); const size = require('gulp-size');
const sourcemaps = require('gulp-sourcemaps'); const sourcemaps = require('gulp-sourcemaps');
const through = require('through2'); const through = require('through2');
const browserSync = require("browser-sync").create();
// ------------------------------------ // ------------------------------------
// Deployment // Deployment
// ------------------------------------ // ------------------------------------
@@ -245,11 +245,20 @@ gulp.task('watch', () => {
gulp.watch(paths.demo.src.sass, gulp.parallel(...tasks.css)); gulp.watch(paths.demo.src.sass, gulp.parallel(...tasks.css));
}); });
// Serve via browser sync
gulp.task('serve', () => browserSync.init({
server: {
baseDir: paths.demo.root
},
notify: false,
watch: true
}));
// Build distribution // Build distribution
gulp.task('build', gulp.series(tasks.clean, gulp.parallel(...tasks.js, ...tasks.css, ...tasks.sprite ))); gulp.task('build', gulp.series(tasks.clean, gulp.parallel(...tasks.js, ...tasks.css, ...tasks.sprite )));
// Default gulp task // Default gulp task
gulp.task('default', gulp.series('build', 'watch')); gulp.task('default', gulp.series('build', 'serve', 'watch' ));
// Publish a version to CDN and demo // Publish a version to CDN and demo
// -------------------------------------------- // --------------------------------------------
+34 -33
View File
@@ -36,61 +36,62 @@
"deploy": "yarn lint && gulp deploy" "deploy": "yarn lint && gulp deploy"
}, },
"devDependencies": { "devDependencies": {
"ansi-colors": "^4.0.1", "ansi-colors": "^4.1.1",
"aws-sdk": "^2.478.0", "aws-sdk": "^2.601.0",
"@babel/core": "^7.4.5", "@babel/core": "^7.8.0",
"@babel/preset-env": "^7.4.5", "@babel/preset-env": "^7.8.2",
"babel-eslint": "^10.0.2", "babel-eslint": "^10.0.3",
"del": "^4.1.1", "browser-sync": "^2.26.7",
"eslint": "^5.16.0", "del": "^5.1.0",
"eslint-config-airbnb-base": "^13.1.0", "eslint": "^6.8.0",
"eslint-config-prettier": "^5.0.0", "eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.17.3", "eslint-config-prettier": "^6.9.0",
"eslint-plugin-simple-import-sort": "^4.0.0", "eslint-plugin-import": "^2.20.0",
"eslint-plugin-simple-import-sort": "^5.0.0",
"fancy-log": "^1.3.3", "fancy-log": "^1.3.3",
"fastly-purge": "^1.0.1", "fastly-purge": "^1.0.1",
"git-branch": "^2.0.1", "git-branch": "^2.0.1",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-autoprefixer": "^6.1.0", "gulp-autoprefixer": "^7.0.1",
"gulp-awspublish": "^4.0.0", "gulp-awspublish": "^4.1.1",
"gulp-better-rollup": "^4.0.1", "gulp-better-rollup": "^4.0.1",
"gulp-clean-css": "^4.2.0", "gulp-clean-css": "^4.2.0",
"gulp-filter": "^6.0.0", "gulp-filter": "^6.0.0",
"gulp-header": "^2.0.7", "gulp-header": "^2.0.9",
"gulp-imagemin": "^6.0.0", "gulp-imagemin": "^6.2.0",
"gulp-open": "^3.0.1", "gulp-open": "^3.0.1",
"gulp-plumber": "^1.2.1", "gulp-plumber": "^1.2.1",
"gulp-postcss": "^8.0.0", "gulp-postcss": "^8.0.0",
"gulp-rename": "^1.4.0", "gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0", "gulp-replace": "^1.0.0",
"gulp-sass": "^4.0.2", "gulp-sass": "^4.0.2",
"gulp-size": "^3.0.0", "gulp-size": "^3.0.0",
"gulp-sourcemaps": "^2.6.5", "gulp-sourcemaps": "^2.6.5",
"gulp-svgstore": "^7.0.1", "gulp-svgstore": "^7.0.1",
"gulp-terser": "^1.2.0", "gulp-terser": "^1.2.0",
"postcss-custom-properties": "^9.0.1", "postcss-custom-properties": "^9.0.2",
"prettier-eslint": "^9.0.0", "prettier-eslint": "^9.0.1",
"prettier-stylelint": "^0.4.2", "prettier-stylelint": "^0.4.2",
"remark-cli": "^6.0.1", "remark-cli": "^7.0.1",
"remark-validate-links": "^8.0.3", "remark-validate-links": "^9.1.0",
"rollup": "^1.15.6", "rollup": "^1.29.0",
"rollup-plugin-babel": "^4.3.2", "rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.0", "rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.0.3", "rollup-plugin-node-resolve": "^5.2.0",
"stylelint": "^10.1.0", "stylelint": "^12.0.1",
"stylelint-config-prettier": "^5.2.0", "stylelint-config-prettier": "^8.0.0",
"stylelint-config-recommended": "^2.2.0", "stylelint-config-recommended": "^3.0.0",
"stylelint-config-sass-guidelines": "^6.0.0", "stylelint-config-sass-guidelines": "^6.2.0",
"stylelint-order": "^3.0.0", "stylelint-order": "^4.0.0",
"stylelint-scss": "^3.8.0", "stylelint-scss": "^3.13.0",
"stylelint-selector-bem-pattern": "^2.1.0", "stylelint-selector-bem-pattern": "^2.1.0",
"through2": "^3.0.1" "through2": "^3.0.1"
}, },
"dependencies": { "dependencies": {
"core-js": "^3.1.4", "core-js": "^3.6.3",
"custom-event-polyfill": "^1.0.7", "custom-event-polyfill": "^1.0.7",
"loadjs": "^3.6.1", "loadjs": "^4.2.0",
"rangetouch": "^2.0.0", "rangetouch": "^2.0.0",
"url-polyfill": "^1.1.5" "url-polyfill": "^1.1.7"
} }
} }
+12 -5
View File
@@ -9,22 +9,29 @@
"**/node_modules": true, "**/node_modules": true,
"**/dist": true "**/dist": true
}, },
// Linting // Linting
"stylelint.enable": true, "stylelint.enable": true,
"css.validate": false, "css.validate": false,
"scss.validate": false, "scss.validate": false,
"javascript.validate.enable": false, "javascript.validate.enable": false,
// Prettier
"prettier.eslintIntegration": true,
"prettier.stylelintIntegration": true,
// Formatting // Formatting
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 4, "editor.tabSize": 4,
"editor.insertSpaces": true, "editor.insertSpaces": true,
"editor.formatOnSave": true, "editor.formatOnSave": true,
// Trim on save // Trim on save
"files.trimTrailingWhitespace": true "files.trimTrailingWhitespace": true,
// Special file associations
"files.associations": {
".eslintrc": "jsonc"
},
"editor.codeActionsOnSave": {
"source.fixAll": true
}
} }
} }
+2 -2
View File
@@ -441,7 +441,7 @@ class Plyr {
* @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime * @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime
*/ */
rewind(seekTime) { rewind(seekTime) {
this.currentTime = this.currentTime - (is.number(seekTime) ? seekTime : this.config.seekTime); this.currentTime -= is.number(seekTime) ? seekTime : this.config.seekTime;
} }
/** /**
@@ -449,7 +449,7 @@ class Plyr {
* @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime * @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime
*/ */
forward(seekTime) { forward(seekTime) {
this.currentTime = this.currentTime + (is.number(seekTime) ? seekTime : this.config.seekTime); this.currentTime += is.number(seekTime) ? seekTime : this.config.seekTime;
} }
/** /**
+3168 -1447
View File
File diff suppressed because it is too large Load Diff