diff options
author | Sam Potts <me@sampotts.me> | 2016-01-14 00:23:57 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2016-01-14 00:23:57 +1100 |
commit | ca8fd08e81e79875505f432b304e8140a3978ed4 (patch) | |
tree | 0e98da7ed199580380ee6596cd28636f787b1562 /gulpfile.js | |
parent | bc67d969cbba42b5a93866c42c8b49facf532a49 (diff) | |
download | plyr-ca8fd08e81e79875505f432b304e8140a3978ed4.tar.lz plyr-ca8fd08e81e79875505f432b304e8140a3978ed4.tar.xz plyr-ca8fd08e81e79875505f432b304e8140a3978ed4.zip |
Use only one index.html for testing locally, fixes for limited controls, larger seek handle
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gulpfile.js b/gulpfile.js index e3bd6f43..ca7c0de5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -214,7 +214,8 @@ options = { // If aws is setup if("cdn" in aws) { - var cdnpath = new RegExp(aws.cdn.bucket + "\/(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)","gi"); + var cdnpath = new RegExp(aws.cdn.bucket + "\/(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)","gi"), + localpath = new RegExp("(\.\.\/)?dist", "gi"); } // Publish version to CDN bucket @@ -243,14 +244,14 @@ gulp.task("docs", function () { .pipe(replace(cdnpath, aws.cdn.bucket + "/" + version)) .pipe(gulp.dest(root)); - // Replace versioned files in *.html + // 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"]) - .pipe(replace(cdnpath, aws.cdn.bucket + "/" + version)) - .pipe(gulp.dest(paths.docs.root)) + .pipe(replace(localpath, "https://" + aws.cdn.bucket + "/" + version)) .pipe(gzip()) .pipe(s3(aws.docs, options.docs)); - // Upload error.html to cdn using docs options + // Upload error.html to cdn (as well as docs site) gulp.src([paths.docs.root + "error.html"]) .pipe(gzip()) .pipe(s3(aws.cdn, options.docs)); |