diff options
author | Sam Potts <sam@selz.com> | 2018-01-08 12:12:11 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-08 12:12:11 +1100 |
commit | 9872207e87dd4c1e3a0d5a589bff8fc6e4ff6cb7 (patch) | |
tree | 4d75d0c4e3849a90b5f11be3b316b8a761a3524b /gulpfile.js | |
parent | dd190155c4aec1d1550517525554c53b10eceef3 (diff) | |
parent | 58d942e737a8039bdc2fa2bf42d01cf219d3fa3d (diff) | |
download | plyr-9872207e87dd4c1e3a0d5a589bff8fc6e4ff6cb7.tar.lz plyr-9872207e87dd4c1e3a0d5a589bff8fc6e4ff6cb7.tar.xz plyr-9872207e87dd4c1e3a0d5a589bff8fc6e4ff6cb7.zip |
Merge pull request #752 from friday/gulp-fix
Enable gulp builds when aws.json isn't present.
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gulpfile.js b/gulpfile.js index ae48db56..c587bfec 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -30,7 +30,11 @@ const resolve = require('rollup-plugin-node-resolve'); const bundles = require('./bundles.json'); const pkg = require('./package.json'); -const aws = require('./aws.json'); + +let aws; +try { + aws = require('./aws.json'); +} catch (err) {} // Paths const root = __dirname; @@ -240,7 +244,7 @@ const options = { }; // If aws is setup -if ('cdn' in aws) { +if (aws && '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 cdnpath = new RegExp(`${aws.cdn.domain}/${regex}`, 'gi'); const semver = new RegExp(`v${regex}`, 'gi'); |