aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2016-02-28 11:22:11 +1100
committerSam Potts <me@sampotts.me>2016-02-28 11:22:11 +1100
commit1bbc47c64f6ad9dfbe58ab05ce65ec6ed9366c4c (patch)
tree0158ca724d34b35011b3addc4b6f512249d1723c /gulpfile.js
parent7a1a5830aae174f3a01f3c3ee01c6e9569687fad (diff)
downloadplyr-1bbc47c64f6ad9dfbe58ab05ce65ec6ed9366c4c.tar.lz
plyr-1bbc47c64f6ad9dfbe58ab05ce65ec6ed9366c4c.tar.xz
plyr-1bbc47c64f6ad9dfbe58ab05ce65ec6ed9366c4c.zip
CustomEvent polyfill (Fixes #172)
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 35c9d973..5083a75b 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -214,8 +214,10 @@ options = {
// If aws is setup
if("cdn" in aws) {
- var cdnpath = new RegExp(aws.cdn.bucket + "\/(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)","gi"),
- localpath = new RegExp("(\.\.\/)?dist", "gi");
+ var regex = "(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)",
+ cdnpath = new RegExp(aws.cdn.bucket + "\/" + regex, "gi"),
+ semver = new RegExp("v" + regex, "gi"),
+ localpath = new RegExp("(\.\.\/)?dist", "gi");
}
// Publish version to CDN bucket
@@ -244,6 +246,11 @@ gulp.task("docs", function () {
.pipe(replace(cdnpath, aws.cdn.bucket + "/" + version))
.pipe(gulp.dest(root));
+ // Replace versioned files in plyr.js
+ gulp.src(path.join(root, "src/js/plyr.js"))
+ .pipe(replace(semver, "v" + version))
+ .pipe(gulp.dest(path.join(root, "src/js/")));
+
// Replace local file paths with remote paths in docs
// e.g. "../dist/plyr.js" to "https://cdn.plyr.io/x.x.x/plyr.js"
gulp.src([paths.docs.root + "*.html"])