Tidying up, bower changes
- Folder tidy up - Bower updated to include source files - Upgraded to svgstore 5.0.0
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
|
"version": "1.0.10",
|
||||||
"description": "A simple HTML5 media player using custom controls",
|
"description": "A simple HTML5 media player using custom controls",
|
||||||
"homepage": "http://plyr.io",
|
"homepage": "http://plyr.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -14,7 +15,10 @@
|
|||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"main": [
|
"main": [
|
||||||
"dist/css/plyr.css",
|
"dist/css/plyr.css",
|
||||||
"dist/js/plyr.js"
|
"dist/js/plyr.js",
|
||||||
|
"dist/sprite.svg",
|
||||||
|
"src/less/plyr.less",
|
||||||
|
"src/js/plyr.js"
|
||||||
],
|
],
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
10
bundles.json
@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"less": {
|
"less": {
|
||||||
"plyr.css": ["assets/less/plyr.less"],
|
"plyr.css": ["src/less/plyr.less"],
|
||||||
"docs.css": ["assets/less/docs.less"]
|
"docs.css": ["src/less/docs.less"]
|
||||||
},
|
},
|
||||||
"js": {
|
"js": {
|
||||||
"plyr.js": ["assets/js/plyr.js"],
|
"plyr.js": ["src/js/plyr.js"],
|
||||||
"docs.js": [
|
"docs.js": [
|
||||||
"assets/js/lib/hogan-3.0.2.mustache.js",
|
"src/js/lib/hogan-3.0.2.mustache.js",
|
||||||
"dist/js/templates.js",
|
"dist/js/templates.js",
|
||||||
"assets/js/docs.js"
|
"src/js/docs.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
2
dist/js/plyr.js
vendored
0
dist/svg/sprite.svg → dist/sprite.svg
vendored
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
63
gulpfile.js
@ -17,23 +17,21 @@ var fs = require("fs"),
|
|||||||
svgmin = require("gulp-svgmin"),
|
svgmin = require("gulp-svgmin"),
|
||||||
hogan = require("gulp-hogan-compile");
|
hogan = require("gulp-hogan-compile");
|
||||||
|
|
||||||
var projectPath = __dirname;
|
var root = __dirname,
|
||||||
var paths = {
|
paths = {
|
||||||
project: projectPath,
|
|
||||||
|
|
||||||
// Watch paths
|
// Watch paths
|
||||||
watchless: path.join(projectPath, "assets/less/**/*"),
|
watch: {
|
||||||
watchjs: path.join(projectPath, "assets/js/**/*"),
|
less: path.join(root, "src/less/**/*"),
|
||||||
watchicons: path.join(projectPath, "assets/icons/**/*"),
|
js: path.join(root, "src/js/**/*"),
|
||||||
watchtemplates: path.join(projectPath, "assets/templates/**/*"),
|
sprite: path.join(root, "src/sprite/*.svg"),
|
||||||
|
templates: path.join(root, "src/templates/*.html"),
|
||||||
// SVG Icons
|
},
|
||||||
svg: path.join(projectPath, "assets/icons/*.svg"),
|
|
||||||
|
|
||||||
// Output paths
|
// Output paths
|
||||||
js: path.join(projectPath, "dist/js/"),
|
output: {
|
||||||
css: path.join(projectPath, "dist/css/"),
|
js: path.join(root, "dist/js/"),
|
||||||
icons: path.join(projectPath, "dist/svg/")
|
css: path.join(root, "dist/css/"),
|
||||||
|
sprite: path.join(root, "dist/")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Task names
|
// Task names
|
||||||
@ -41,7 +39,7 @@ taskNames = {
|
|||||||
jsAll: "js-all",
|
jsAll: "js-all",
|
||||||
lessBuild: "less-",
|
lessBuild: "less-",
|
||||||
jsBuild: "js-",
|
jsBuild: "js-",
|
||||||
iconBuild: "icon-build",
|
sprite: "sprite-build",
|
||||||
templates: "templates"
|
templates: "templates"
|
||||||
},
|
},
|
||||||
// Task arrays
|
// Task arrays
|
||||||
@ -49,7 +47,7 @@ lessBuildTasks = [],
|
|||||||
jsBuildTasks = [],
|
jsBuildTasks = [],
|
||||||
|
|
||||||
// Fetch bundles from JSON
|
// Fetch bundles from JSON
|
||||||
bundles = loadJSON(path.join(paths.project, "bundles.json"));
|
bundles = loadJSON(path.join(root, "bundles.json"));
|
||||||
|
|
||||||
// Load json
|
// Load json
|
||||||
function loadJSON(path) {
|
function loadJSON(path) {
|
||||||
@ -59,14 +57,14 @@ function loadJSON(path) {
|
|||||||
// Build templates
|
// Build templates
|
||||||
gulp.task(taskNames.templates, function () {
|
gulp.task(taskNames.templates, function () {
|
||||||
return gulp
|
return gulp
|
||||||
.src(paths.watchtemplates)
|
.src(paths.watch.templates)
|
||||||
.pipe(hogan("templates.js", {
|
.pipe(hogan("templates.js", {
|
||||||
wrapper: false,
|
wrapper: false,
|
||||||
templateName: function (file) {
|
templateName: function (file) {
|
||||||
return path.basename(file.relative.replace(/\\/g, "-"), path.extname(file.relative));
|
return path.basename(file.relative.replace(/\\/g, "-"), path.extname(file.relative));
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest(paths.js));
|
.pipe(gulp.dest(paths.output.js));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Process JS
|
// Process JS
|
||||||
@ -80,7 +78,7 @@ for (var key in bundles.js) {
|
|||||||
.src(bundles.js[key])
|
.src(bundles.js[key])
|
||||||
.pipe(concat(key))
|
.pipe(concat(key))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(gulp.dest(paths.js));
|
.pipe(gulp.dest(paths.output.js));
|
||||||
});
|
});
|
||||||
})(key);
|
})(key);
|
||||||
}
|
}
|
||||||
@ -97,32 +95,29 @@ for (var key in bundles.less) {
|
|||||||
.pipe(less())
|
.pipe(less())
|
||||||
.on("error", gutil.log)
|
.on("error", gutil.log)
|
||||||
.pipe(concat(key))
|
.pipe(concat(key))
|
||||||
.pipe(prefix(["last 2 versions", "> 1%", "ie 9"], { cascade: true }))
|
.pipe(prefix(["last 2 versions"], { cascade: true }))
|
||||||
.pipe(minifyCss())
|
.pipe(minifyCss())
|
||||||
.pipe(gulp.dest(paths.css));
|
.pipe(gulp.dest(paths.output.css));
|
||||||
});
|
});
|
||||||
})(key);
|
})(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process Icons
|
// Process Icons
|
||||||
gulp.task(taskNames.iconBuild, function () {
|
gulp.task(taskNames.sprite, function () {
|
||||||
return gulp
|
return gulp
|
||||||
.src(paths.svg)
|
.src(paths.watch.sprite)
|
||||||
.pipe(svgmin({
|
.pipe(svgmin({
|
||||||
plugins: [{
|
plugins: [{
|
||||||
removeDesc: true
|
removeDesc: true
|
||||||
}]
|
}]
|
||||||
}))
|
}))
|
||||||
.pipe(svgstore({
|
.pipe(svgstore())
|
||||||
prefix: "icon-",
|
.pipe(gulp.dest(paths.output.sprite));
|
||||||
fileName: "sprite.svg"
|
|
||||||
}))
|
|
||||||
.pipe(gulp.dest(paths.icons));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Default gulp task
|
// Default gulp task
|
||||||
gulp.task("default", function(){
|
gulp.task("default", function(){
|
||||||
runSequence(taskNames.jsAll, lessBuildTasks.concat(taskNames.iconBuild, "watch"));
|
runSequence(taskNames.jsAll, lessBuildTasks.concat(taskNames.sprite, "watch"));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Build all JS (inc. templates)
|
// Build all JS (inc. templates)
|
||||||
@ -132,8 +127,8 @@ gulp.task(taskNames.jsAll, function(){
|
|||||||
|
|
||||||
// Watch for file changes
|
// Watch for file changes
|
||||||
gulp.task("watch", function () {
|
gulp.task("watch", function () {
|
||||||
//gulp.watch(paths.watchtemplates, [taskNames.jsAll]);
|
//gulp.watch(paths.watch.templates, [taskNames.jsAll]);
|
||||||
//gulp.watch(paths.watchjs, [taskNames.jsAll]);
|
//gulp.watch(paths.watch.js, [taskNames.jsAll]);
|
||||||
gulp.watch(paths.watchless, lessBuildTasks);
|
gulp.watch(paths.watch.less, lessBuildTasks);
|
||||||
gulp.watch(paths.watchicons, [taskNames.iconBuild]);
|
gulp.watch(paths.watch.sprite, [taskNames.iconBuild]);
|
||||||
});
|
});
|
@ -26,7 +26,7 @@
|
|||||||
<source src="//cdn.sampotts.me/plyr/movie.webm" type="video/webm">
|
<source src="//cdn.sampotts.me/plyr/movie.webm" type="video/webm">
|
||||||
|
|
||||||
<!-- Text track file -->
|
<!-- Text track file -->
|
||||||
<track kind="captions" label="English" srclang="en" src="assets/movie_en_captions.vtt" default>
|
<track kind="captions" label="English" srclang="en" src="//cdn.sampotts.me/plyr/movie_en_captions.vtt" default>
|
||||||
|
|
||||||
<!-- Fallback for browsers that don't support the <video> element -->
|
<!-- Fallback for browsers that don't support the <video> element -->
|
||||||
<div>
|
<div>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
<!-- Load SVG defs -->
|
<!-- Load SVG defs -->
|
||||||
<script>
|
<script>
|
||||||
(function(d,p){var a=new XMLHttpRequest(),b=d.body;a.open("GET",p,!0);a.send();a.onload=function(){var c=d.createElement("div");c.style.display="none";c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}})(document,"dist/svg/sprite.svg");
|
(function(d,p){var a=new XMLHttpRequest(),b=d.body;a.open("GET",p,!0);a.send();a.onload=function(){var c=d.createElement("div");c.style.display="none";c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}})(document,"dist/sprite.svg");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Core player -->
|
<!-- Core player -->
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "1.0.0",
|
"version": "1.0.10",
|
||||||
"description": "A simple HTML5 media player using custom controls",
|
"description": "A simple HTML5 media player using custom controls",
|
||||||
"homepage": "http://plyr.io",
|
"homepage": "http://plyr.io",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
@ -13,7 +13,7 @@
|
|||||||
"gulp-less": "~1.3.1",
|
"gulp-less": "~1.3.1",
|
||||||
"gulp-minify-css": "~0.3.6",
|
"gulp-minify-css": "~0.3.6",
|
||||||
"gulp-svgmin": "^1.0.0",
|
"gulp-svgmin": "^1.0.0",
|
||||||
"gulp-svgstore": "^4.0.1",
|
"gulp-svgstore": "^5.0.0",
|
||||||
"gulp-uglify": "~0.3.1",
|
"gulp-uglify": "~0.3.1",
|
||||||
"gulp-util": "~2.2.20",
|
"gulp-util": "~2.2.20",
|
||||||
"run-sequence": "^0.3.6"
|
"run-sequence": "^0.3.6"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr
|
// Plyr
|
||||||
// plyr.js v1.0.9
|
// plyr.js v1.0.10
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Credits: http://paypal.github.io/accessible-html5-video-player/
|
// Credits: http://paypal.github.io/accessible-html5-video-player/
|
@ -35,7 +35,6 @@ html {
|
|||||||
body {
|
body {
|
||||||
font-family: "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
//.font-size(16);
|
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #6D797F;
|
color: #6D797F;
|
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 635 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1021 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |