Skip to content

Commit

Permalink
IE & Edge fixes, Storage & Console classes
Browse files Browse the repository at this point in the history
  • Loading branch information
sampotts committed Dec 8, 2017
1 parent de54929 commit c8990bd
Show file tree
Hide file tree
Showing 33 changed files with 1,038 additions and 602 deletions.
30 changes: 1 addition & 29 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,29 +1 @@
{
// Exclude from the editor
"files.exclude": {
"**/node_modules": true
},

// Exclude from search
"search.exclude": {
"dist/": true
},

// Linting
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false,
"javascript.validate.enable": false,

// Prettier
"prettier.eslintIntegration": true,
"prettier.stylelintIntegration": true,

// Formatting
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.formatOnSave": true,

// Trim on save
"files.trimTrailingWhitespace": true
}
{}
2 changes: 1 addition & 1 deletion demo/dist/demo.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/dist/demo.js

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

2 changes: 1 addition & 1 deletion demo/dist/demo.js.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions demo/src/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ document.addEventListener('DOMContentLoaded', () => {
}, 0);
});

/* document.body.addEventListener('ready', function(event) {
console.log(event);
}); */

// Setup the player
const player = new window.Plyr('#player', {
debug: true,
Expand Down
2 changes: 1 addition & 1 deletion dist/plyr.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.js.map

Large diffs are not rendered by default.

28 changes: 19 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* global require, __dirname */
/* eslint no-console: "off" */

const fs = require('fs');
const del = require('del');
const path = require('path');
const gulp = require('gulp');
const gutil = require('gulp-util');
Expand Down Expand Up @@ -70,6 +70,7 @@ const tasks = {
sass: [],
js: [],
sprite: [],
clean: ['clean'],
};

// Size plugin
Expand Down Expand Up @@ -97,10 +98,20 @@ const babelrc = {
exclude: 'node_modules/**',
};

// Clean out /dist
gulp.task('clean', () => {
const dirs = [paths.plyr.output, paths.demo.output].map(dir => path.join(dir, '**/*'));

// Don't delete the mp4
dirs.push(`!${path.join(paths.plyr.output, '**/*.mp4')}`);

del(dirs);
});

const build = {
js(files, bundle, options) {
Object.keys(files).forEach(key => {
const name = `js-${key}`;
const name = `js:${key}`;
tasks.js.push(name);

gulp.task(name, () =>
Expand All @@ -124,7 +135,7 @@ const build = {
},
less(files, bundle) {
Object.keys(files).forEach(key => {
const name = `less-${key}`;
const name = `less:${key}`;
tasks.less.push(name);

gulp.task(name, () =>
Expand All @@ -142,7 +153,7 @@ const build = {
},
sass(files, bundle) {
Object.keys(files).forEach(key => {
const name = `sass-${key}`;
const name = `sass:${key}`;
tasks.sass.push(name);

gulp.task(name, () =>
Expand All @@ -159,7 +170,7 @@ const build = {
});
},
sprite(bundle) {
const name = `sprite-${bundle}`;
const name = `svg:sprite:${bundle}`;
tasks.sprite.push(name);

// Process Icons
Expand Down Expand Up @@ -217,7 +228,7 @@ gulp.task('watch', () => {

// Default gulp task
gulp.task('default', () => {
run(tasks.js, tasks.less, tasks.sprite, 'watch');
run(tasks.clean, tasks.js, tasks.less, tasks.sprite, 'watch');
});

// Publish a version to CDN and demo
Expand Down Expand Up @@ -250,8 +261,7 @@ const options = {

// If aws is setup
if ('cdn' in aws) {
const regex =
'(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*).(?:0|[1-9][0-9]*)(?:-[\\da-z\\-]+(?:.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:.[\\da-z\\-]+)*)?';
const regex = '(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*).(?:0|[1-9][0-9]*)(?:-[\\da-z\\-]+(?:.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:.[\\da-z\\-]+)*)?';
const cdnpath = new RegExp(`${aws.cdn.domain}/${regex}`, 'gi');
const semver = new RegExp(`v${regex}`, 'gi');
const localPath = new RegExp('(../)?dist', 'gi');
Expand Down Expand Up @@ -350,6 +360,6 @@ if ('cdn' in aws) {

// Do everything
gulp.task('publish', () => {
run(tasks.js, tasks.less, tasks.sprite, 'cdn', 'demo');
run(tasks.clean, tasks.js, tasks.less, tasks.sprite, 'cdn', 'demo');
});
}
Loading

0 comments on commit c8990bd

Please sign in to comment.